Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

5251.

In the given figure ∠ PQR = ∠ PRQ, then prove that ∠ PQS = ∠ PRT.

Answer»

∵ Ray QP and RP exist on line ST. 

∴ ∠ SQP + ∠ PQR = 180° ⇒ ∠ PQS + ∠ PQR and 

∠SRP + ∠PRT = 180° ⇒ ∠PRQ + ∠PRT 

=> ∠ PQS + ∠ PQR = ∠ PRQ + ∠ PRT 

=> ∠ PQS + ∠ PQR = ∠ PQR + ∠ PRT [ ∵ ∠ PRQ = ∠ PQR Given] 

=> ∠ PQS = ∠ PRT

5252.

Find the mode of 14,25,14,28,18, 17,18, 14, 23, 22,14,18.

Answer»

The given numbers are 14,25,14, 28, 18,17, 18, 14, 23, 22, 14 and 18. 

Arranging the data in ascending order: 

14, 14,14, 14, 17, 18, 18, 18, 22, 23,25, 28 

M0 = Mode = Maximum number of repeated value of the data

= 14 (Since 14 is occur 4 times) 

M0 = 14

5253.

Write the equation of x-axis, y-axis, coordinates of origin and coordinates of point P.

Answer»

(i) Equation of x-axis is y = 0. 

(ii) Equation of y-axis is x = 0. 

(iii) Coordinates of origin = (0, 0).

(iv) Coordinates of point P = (x, y)

5254.

HCF of 1354 and 3478

Answer»

Prime factorization method

1354 = 2 x 677

3478 = 2 x 37 x 47

HCF = Product of smallest power of each common prime factor = 2

5255.

Write three such behaviours of glucose which cannot be explained by an open chain structure of glucose molecule. What alternative structure has been proposed for the glucose molecule?

Answer»

The following reactions cannot be explained by the open chain structure of glucose. (i) Despite having the aldehyde group, glucose does not give 2, 4– DNP test, Schiffs test and it does not form the hydrogensulphite addition product with NaHSO3 . (ii) The penta acetate of glucose does not react with hydroxyl amine indicating the absence of free —CHO group. (iii) D–Glucose on treatment of methyl alcohol in the presence of dry HCl gas gives two isomeric nonomethyl derivatives known as α-D-glucoside and methyl β– D–glucoside. These glucosides do not reduce fehling solution and also do not react with hydrogen cyanide indicating the absence of free —CHO group. A ring structure called pyranose structure (α- or β-) is proposed for the glucose molecule.

5256.

“While choosing plays a director focuses on various elements of a play”. What are the elements of a play? Discuss any four in detail.

Answer»

Elements of Play: Most successful playwrights follow the theories of playwriting and drama that were established over two thousand years ago by Aristotle. In his work the Poetics, Aristotle outlined the six elements of drama in his critical analysis of the classical Greek tragedy Oedipus Rex written by the Greek playwright Sophocles, in the fifth century B.C.

The six elements as they are outlined involve: 

Thought/theme/ideas, action/plot, characters, language, music and spectacle.

(a) Thought/theme/ideas: What the play means as opposed to what happens (the plot). Sometimes the theme is clearly stated in the title. It may be stated through a dialogue by a character acting as the playwright’s voice or it may be the theme is less obvious and emerges only after some study or thought. E.g., the abstract issues and feelings that grow out of the dramatic action.

(b) Action/plot: The events of a play, the story as opposed to the theme i.e., what happens rather than what it means. The plot must have some sort of unity and clarity by setting up a pattern by which each action initiating the next rather than standing alone without connection to what came before it or what follows. In the plot of a play, characters are involved in a conflict that has a pattern of movement. The action and movement in the play begins from the initial entanglement, through rising action, climax and falling action to resolution.

(c) Characters: These are the individuals presented in the play that are involved in pursuing the plot. Each character should have his/her own distinct personality, age, appearance, beliefs, socio-economic background and language.

(d) Language: Refers to the word choices made by the playwright and the pronunciation of the actors of the language. Language and dialogue delivered by the characters move the plot and action forward, provides exposition and define the distinct characters. A playwright can create his/her own specific style in relationship to language choices he/she use in establishing character and dialogue.

(e) Music: Music can encompass the rhythm of dialogue and speeches in a play or can also mean the aspects of the melody and music compositions as in a musical theatre. Each theatrical presentation delivers music, rhythm and melody in its own distinctive manner. Music is not a part of every play. But, music can be included to mean all sounds in a production. Music can expand to all sound effects, the actors’ voices, songs and instrumental music played as underscore in a play.

Music creates patterns and establishes the tempo in the theatre. In the aspects of the musical, the songs are used to push the plot forward and move the story to a higher level of intensity. Composers and lyricists work together with playwrights to strengthen the themes and ideas of the play. Characters’ wants and desires can be fortified for the audience through lyrics and music.

5257.

Identify and explain the two levels of exploration in research work.

Answer»

Research work collaborates and includes two levels of exploration:-

1. Gathering Data: To identify concerns and issues derived from curriculum, its plan and practice.

2. Reviewing Data: The review of data findings with collaborators helps them to reflect on the material from their interviews and workshops, to extrapolate the principles underpinning the project guidelines.

5258.

What is ‘Theatre of Cruelty’? Who developed this form of theatre?

Answer»

Artaud believed that the theatre should represent reality and its effect should reach the audience as much as possible. His work ‘The Theatre and Its Double’ were largely discussed.Artaud formulated his ideas into a manifesto and named it the ‘Theatre of Cruelty’. His focus is to give a sensorial experience to the audience with a combination of design and performance skills.

5259.

‘Make up, though regarded as necessary but its vast possibilities for effectiveness is generally under estimated.’ Comment.

Answer»

Make-up: 

Make-up, though regarded as necessary, its vast possibilities for effectiveness is generally underestimated, and thus not much heed or importance is given to make-up by directors and even actors. 

Basically, there are two types of make-up: 

the straight make-up and 

the character make-up. 

Straight make-up is generally used to correct the actor’s personal skin tone and to make him or her look little more attractive on stage and the objective of character make up is to change completely or partially actor’s appearance. It is important for the actor and the director to think right from the reading of the play what they want is desired for makeup for a particular character. It is sort of developing a mental visual image of the look of the character. Most of them ignore the hairdo for a character, except when age has to be shown. But it may be necessary to choose a particular hairstyle, say a center parting etc for accentuating the style of hair a particular character needs. Sometimes, wigs may be required to create a style for a character from a period in history.

5260.

(i) A coil of insulated copper wire is connected to a galvanometer. What happens if a bar magnet is:(a) pushed into the coil ?(b) withdrawn from inside the coil ?(c) held stationary inside the coil ?Give reasons for your observation.(ii) Mention one more method of inducing currrent in a coil.

Answer»

(i) (a) When a bar magnet is pushed into the coil of insulated copper wire connected to a galvanometer, an induced current is set-up in the coil due to charge of magnetic field through it. As a result, galvanometer gives a deflection (say towards left).
(b) When the bar magnet is withdrawn from inside the coil, again an induced current is set up in the coil due to charge of magnetic field through it. As a result galvanometer gives a deflection in the reverse direction. (say towards right).
(c) If the bar magnet is held stationary inside the coil, then is no induced current in the coil, because there is no change in magnetic field through it. As a result galvanometer does not show any deflection.
(ii) By changing current in another coil placed near it.

5261.

State in brief the function of digestive enzymes.

Answer»

Digestive enzymes are hydrolytic enzymes that breaks down the complex substances present in the food to simpler and soluble substances that are readily absorbed by the body. 

e.g., Protein + Enzyme → Peptones + Enzyme → Peptides + Enzyme → Amino acid.  

Thus, the digestive enzymes helps in the digestion of complex foods such as carbohydrates, proteins, etc.

5262.

"Two areas of study namely 'evolution' and 'classification' are interlinked". justify this statement.

Answer»

(a) Different forms of organisms/ life have evolved during the course of evolution, and classification deals with grouping of these organisms into groups and subgroup based on their similarities and differences.

(b) The more characteristics of any two species have in common, more closely they are related/ well have a more recent ancestor (and vice versa).

(c) Thus classification helps tracing the evolutionary relationships between the two organisms. Hence classification and evolution are interlinked. 

5263.

(i) "Two areas of study namely 'evolution' and 'classification' are interlinked .justify this statement.(ii) State two methods of determining the age of fossils.

Answer» (i) (a) Different forms of organisms/ life have evolved during the course of evolution, and classification deals with grouping of these organisms into groups and subgroup based on their similarities and differences.
(b) The more characteristics any two species have in common more closely they are related/ well have a more recent ancestor (and vice versa).
(c) Thus classification helps tracing the evolutionary relationships between the two organisms. Hence classification and evolution are interlinked.
(ii) (a) If we dig into the earth and start finding fossils, it can be assumed that the fossils closer to the surface are more recent to those found in the deeper layers.
(b) By detecting the ratios of different isotopes of the same element in the fossil material.
5264.

(i) Explain the terms: (a) implantation  (b) placenta (ii) What is the average duration of human pregnancy?

Answer»

(i) (a) Implantation: Implantation is the process of attachment of the developing embryo or the fertilized egg with the uterine wall. 

(b) Placenta: A disc-shaped special tissue develops between the wall of the uterus and the embryo for exchange of nutrients, supply of oxygen and excretion of waste products. 

(ii) The average duration of human pregnancy is 280 days or 40 weeks or 9 months.

5265.

Define the term magnification as referred to spherical mirrors. If a concave mirror forms a real image 40 cm from the mirror, when the object is placed at a distance of 20 cm from its pole, find the focal length of the mirror.

Answer»

The relative extent to which the image of an object is magnified with respect to object size. It is the ratio of size of the image to the size of the object.

v = – 40 cm, u = –20 cm, f = ? 

1/ f = 1/ v +1/ u

1/ f = – 1 / 40 + – 1 / 20 

f= - 40 /3cm

5266.

Explain analogous organs and homologous organs. Identify the analogous and homologous organs amongst the following: Wings of an insect, wings of a bat, forelimbs of frog, forelimbs of a human.

Answer»

Analogous organs: Those organs which have different basic structural designs and origin, but perform similar functions are called analogous organs. 

Homologous organs: Those organs which have the same basic structural design and origin, but perform different functions are called homologous organs. 

Analogous organs from the given list: Wings of an insect, wings of a bat. 

Homologous organs from the given list: Forelimbs of a frog, forelimbs of a human.

5267.

Distinguish between inherited traits and acquired traits giving one example of each. Give reason why the traits acquired by an individual during the life time are not inherited.

Answer»
Inherited Traits                                                                    Acquired Traits
Changes or characters in the reproductive tissues only can be passed on to the DNA of the germ cells/next generation.                  Changes in non-reproductive tissues cannot be passed on to the DNA of the germ cells/next generation.                                  
Example: Tails of mice/skin colour.Example: Life time experiences/ tanning of skin when exposed to sun.

Reason: Change in non-reproductive tissues cannot be passed on to the DNA of the germ cells.

5268.

Differentiate between self-pollination and Cross-pollination.

Answer»
SELF-POLLINATION CROSS-POLLINATION
(1) The process of transferring the pollen grains from the anther to the stigma of the same flower or the stigma of a flower on the same plant is called self-pollination. (1) The process by which the pollen grains are transferred from the anther of a flower to the stigma of another flower of the same species is called cross-pollination.
(2) It occurs in genetically same plants.(2) It occurs in genetically different plants of the same species.
(3) No external pollinating agents are required.(3) External pollinating agents are required for this type of pollination (water, wind, insects etc).
(4) Eg- Orchids.(4) Eg- Papaya.
5269.

“It is possible that a trait is inherited but may not be expressed.” Give a suitable example to justify this statement.OrWith the help of an example justify the following statement: “A trait may be inherited, but may not be expressed”.

Answer»

Yes, it is possible that a trait is inherited but may not be expressed.
For example, when pure tall pea plants are crossed with pure dwarf pea plants, only tall pea plants are obtained in F1 generation.
On selfing tall plants of F1; both tall and dwarf plants are obtained in F2 generation in the ratio 3:1. Reappearance of the dwarf character, a recessive trait in F2 generation shows that the dwarf trait was present in individuals of F1 but it did not express.

5270.

Give reasons for the following:(i) Sodium hydroxide solution cannot be kept in aluminium containers.(ii) Silver metal does not combine easily with oxygen but silver jewellery tarnishes after some time.(iii) Sodium is obtained by the electrolysis of its molten chloride and not from its aqueous solution.(iv) Aluminium reacts with dilute hydrochloric acid slowly in the beginning.

Answer»

(i) Sodium hydroxide reacts with Al corroding the metal and produces highly flammable hydrogen gas. Hence, it cannot be kept in Al containers.

(ii) Silver is a highly unreactive metal so, it does not react with the oxygen of air easily. But silver jewellery tarnishes after some time (turns black) due to the formation of a thin sulphide layer on their surface by the action of hydrogen sulphide (H2S) gas present in air.

(iii) We cannot use an aqueous solution of sodium chloride to obtain sodium metal because if we electrolyse an aqueous solution of NaCl, then as soon as sodium metal is produced at cathode, it will react with water present in the aqueous solution to form sodium hydroxide. So, the electrolysis of aqueous solution of NaCl will produce NaOH instead of Na metal.

(iv) Al metal reacts with dilute HCl slowly in the beginning due to the presence of a tough protective layer of aluminium oxide on its surface.

5271.

Calculate the amount of heat generated while transferring 90000 coulombs of charge between the two terminals of a batterv of 40 V in one hour. Also determine the power expended in the process

Answer»

Q = 90000 C, t = 1h = 3600 s, V = 40V
I =Q/t=90000/3600= 25 A
R =V/I=40/25= 1.6W
H = I2Rt = 25 × 25 × 1.6 × 3600= 3600 × 103 J = 3600 kJ
P = I2R = 25 × 25 × 1.6= 1000 W = 1 KW

5272.

Name the parts A, B and C shown in the diagram and write their functions

Answer» Part A is Stigma
Function : It is the terminal part of carpel, which may be sticky and helps in receiving the pollen grains from the another of stamen during pollination.
Part B is Pollen tube.
Function : The pollen tube grows out of the pollen grain through the style to reach the ovary.
Part C is female Germ cell.
Function : It is a female gametes which fuses with male gamete to form a diploid cell known as zygote.
5273.

Differentiate between menarche and menopause.

Answer»

Menarche is the beginning of menstruation at puberty. It starts at the age of 13-15. 

Menopause is the cessation of menstruation. It happens around 50 years of age.

5274.

What is photoperiodism? Classify the plants based on photoperiodism.

Answer»

Response of plants to periods of day/night to initiate flowering.  

Long day plants, short day plants and day neutral plants. 

Detailed Answer : 

Photoperiodism is the response of plants with respect to the duration of light (i.e. period of day and light). Based on the response to the duration of light, a plant is classified into three types: 

(i) Long day plant : Long day plants flower when they are exposed to light for a period more than the critical day length. E.g. Radish. 

(ii) Short day plant : Short day plants flower when they are exposed to light for a period less than the critical day length. E.g. Chrysanthemum. 

(iii) Day neutral plant : Day neutral plants are plants where there is no such correlation between exposure to light duration and induction of flowering response. E.g. Tomato

5275.

How a Hacker is different from a Cracker? Mention any two netiquettes. 

Answer»

In computing, a hacker is any skilled computer expert who uses their technical knowledge to overcome a problem or otherwise gains remote access to a protected computer system mainly to get thrill out of it.

A cracker is also a skilled computer expert but he/she breaks into or otherwise violates the system integrity of remote machines with malicious intent. Having gained unauthorized access, crackers destroy vital data, deny legitimate users service, or cause problems for their targets.

Few netiquettes are as follows: 

  • Respect other‟s privacy 
  • Acknowledge and return messages promptly.
  • No spamming
  • When typing never write in all capital letters. That is considered shouting.
5276.

Observe the following C++ code and answer the questions (i) and (ii). Note: Assume all necessary files are included. class FIRST { int Num1; public: void Display () // Member Function1 { cout<< Num1<<end1;} };class SECOND : public FIRST { int Num2; public: void Display () //Member Function2{ cout<<Num2<<end1;} }; void main (){ SECOND S;............... //Statement 1 ............. //Statement 2 }(i) Which Object-Oriented Programming feature is illustrated by the definitions of classes FIRST and SECOND? (ii) Wife Statement 1 and Statement 2 to execute Member Function 1 and Member Function 2 respectively using the object S

Answer»

(i) Inheritance is an Object Oriented Programming feature which is illustrated by the definitions of classes FIRST and SECOND. 

(ii) Statement1

S.FIRST :: Display();

Statement 2

S.SECOND :: Display();

5277.

Look at the following C++ code and find the possible output(s) from the options (i) to (iv) following it. Also, write the highest and lowest values that can be assigned in the array A. Note :Assume all the required header files are already being included in the code.The function random(n) generates an integer between 0 and n -1.void main(){ randomize(); int A[4], C; for(C=0: C<4; c++)A[C]= random(C+1) + 10; for(C=3; C>=0; C--)cout<<A[c]<<"@";}

Answer»

The possible output is 

(iv) [email protected]@[email protected] 

The highest value of array A = 14 

The lowest value of array A = 11

5278.

Which function (s) out of the following can be considered as overloaded function(s) in the same program? Also, write the reason for not considering the other(s) as overloaded function(s).void Execute (char A, int B); //Function1void Execute (int A, char B); //Function2void Execute (int P = 10); //Function3void Execute(); //Function4 int Execute (int A); //Function5void Execute (int &K); //Function6

Answer»

Function1, Function2 and Function 5 can be considered as overloaded function in the same program.

5279.

Evaluate the following postfix using stack & show the content of the stack after the execution of each:20, 4, +, 3, -, 7, 1

Answer»
S.noSymbolOperationStackResult
120push(20)20
24push(4)20, 4
3+pop(4)20
4pop(20)
perform(20+4)
push (24)24
53push(3)24,3
6-pop(3)24
pop(24)
perform(24-3)
push (21)21
77push (7)21,7
8/pop(7)21
pop(21)
perform(21/7)
push (3)3
9pop(3)Result = 3

5280.

What is wrong with the following statements? (a) const int y;(b) long float x;(c) char ch=A;(d) cin » a » ’\n’;

Answer»

a. y has to be initialized

b. long & float both are different data types.

c. A should be written in single quotes ('A').

d. \n can not be taken as input as it is an escape sequence

5281.

Write statement/declaration for the following: (i) A reference to a floating point variable.(ii) To set grant to 10 if speed is more than 68, and to 0 otherwise (usine conditional operator)

Answer»

(i) float f,fp;

fp=&f;

(ii) grant= (speed>68) ? 10:68;

5282.

How is Structure different from an Array?

Answer»

An array is a collection of homogenous data members (eg) int a[10]; contains 10 integers indexed from 0 to 9.

The structure is a collection of heterogeneous data members.

(eg) struct student

{

int rollno;

char name [20];

};

5283.

Observe the following class definition and answer the questions that follow:(i) Write statement to invoke Function 1.(ii) On Executing the above code , Statement 2 is giving an error explain.

Answer»

(i) print I

(ii) The statement 2 is giving an error because __Systemdate is a private variable and hence cannot be printed outside the class.

5284.

Answer the questions (i) and (ii) after going through the following class definition: class Toy :tid =0;tcat = “ “def __init__(self):// Function1..................................... // Blank 2(i) Explain relevance of Function 1.(ii) (a) Fill in the blank 2 with a statement to create object of the class TOY.(b) Write statement to check whether tprice is an attribute of class TOY.

Answer»

(i) __init__ function is used to initialize the members of a class. It is automatically invoked when the object of the class is created.

(ii) (a) T=Toy()

(b) hasattr(T,tprice)

5285.

Define a class Train in PYTHON with following description:Data Memberssrc of type stringTnm of type stringdest of type stringcharges of float• A member function Getdata to assign the following values for ChargesDestChargesMumbai1000Chennai2000Kolkata2500Public membersA constructor to initialize the data members.A function InputData() to allow the user to enter the valuesA function displaydata() to display all and call getdata function

Answer»

class train:

def __init__(self):

_src=""

_tnm=""

_dest=""

_charges=0.0

def getdata(self):

if self._dest=="mumbai" or self._dest=="MUMBAI":

self._charges=1000

elif self._dest=="chennai" or self._dest=="CHENNAI":

self._charges=2000

elif self._dest=="kolkata" or self._dest=="KOLKATA":

self._charges=2500

def inputdata(self):

self._src=raw_input("enter the source of journey")

self._tnm=raw_input("enter the train name")

self._dest=raw_input("enter the destination")

def displaydata(self):

print "the source of journey is",self._src

print "the name of the train is",self._tnm

print "the destination of the train is",self._dest

t.getdata()

print "the charges for your journey",self._charges

5286.

Observe the table named “Training” given above carefully and predict the output of the following queries:(i) select city from training where topic = 'Cyber Security';(ii) select count(Training_Id) from training where email_id like '%gmail% ';(iii) select AVG (Fee) from training where Topic = 'Cyber Security';(iv) select name from training where INSTR (Email_Id, '@’)=0;

Answer»

(i) New Delhi

Faridabad

Gurugram

(ii) 2

(iii) 11000

(iv) Ms. Neena

5287.

Mr. Manav, a database administrator in “Global Educational and Training Institute” has created following table named “Training” for the upcoming training schedule:TrainingHelp him in writing SQL query for the following purpose:(i) To count how many female candidates will be attending the training.(ii) To display list of free trainings.(iii) To display all the cities where Cyber Security training is scheduled along with its fee.(iv) To add a column feedback with suitable data type

Answer»

(i) Select count(name) from training where name like ‘Ms.%’;

(ii) Select * from training where fee is NULL;

(iii) Select city, fee from training where topic = ‘Cyber Security’;

(iv) Alter table training add feedback varchar(20);

5288.

Write any one application each of e-Governance and e-commerce.

Answer»

Overnance 

  • Filing of online application forms for Aadhar card, passport 
  • Filing of IT returns online 
  • Registering an online complaint for any grievance related to government 

Ommerce 

  • Able to do online transactions
  • No need to go to bank for updating the passbooks depositing the money 
  • Online shopping
5289.

Write HTML code to display the unordered list (with square bullets) of two cities “DELHI” and “MUMBAI”. The web page should have a yellow background and the title of the page should be ‘My Cities’ 

Answer»

<HTML>

<HEAD> 

<TITLE> My Cities</TITLE> 

</HEAD> 

<BODY bgcolor=”yellow”> 

<UL type=”square”> 

<LI> DELHI </LI> 

<LI> MUMBAI </LI> 

</UL> 

</BODY> 

</HTML>

5290.

Which file stream is required for seekg() ?

Answer»

fstream/ ifstream

5291.

Observe the following table and answer the parts(i) and(ii) accordinglyTable:ProductPnoNameQtyPurchaseDate101Pen10212 - 12 - 2011102Pencil20121 - 02  - 2013103Eraser9009 -08 - 2010109Sharpener9031 - 08 - 2012113Clips90012 - 12 - 2011(i) Write the names of most appropriate columns, which can be considered as candidate keys.(ii) What is the degree and cardinality of the above table?

Answer»

(i)  Candidate Key: Pno, Name

(ii)  Degree:4

Cardinality:5

5292.

Which file stream is required for seekg() ?

Answer»

fstream/ ifstream

5293.

Write SQL queries for TRAINERTIDTNAMECITYHIREDATESALARY101SUNAINA MUMBAI1998-10-1590000102ANAMIKADELH1994-12-2480000103DEEPTICHANDIGARG2001-12-21 82000104MEENAKSHI DELHI2002-12-25 78000105RICHAMUMBAI 1996-01-1295000106MANIPRABHACHENNAI2001-12-1269000COURSECIDCNAMEFEESSTARTDATETIDC201AGDCA120002018-07-02101C202ADCA150002018-07-15103C203DCA100002018-10-01102C204DDTP90002018-09-15 104C205DHN200002018-08-01101C206O LEVEL180002018-7-25105Display the Trainer Name, City &amp; Salary in descending order of their Hiredate.

Answer»

SELECT TNAME, CITY, SALARY FROM TRAINER ORDER BY HIREDATE;

5294.

Write SQL queries for TRAINERTIDTNAMECITYHIREDATESALARY101SUNAINA MUMBAI1998-10-1590000102ANAMIKADELH1994-12-2480000103DEEPTICHANDIGARG2001-12-21 82000104MEENAKSHI DELHI2002-12-25 78000105RICHAMUMBAI 1996-01-1295000106MANIPRABHACHENNAI2001-12-1269000COURSECIDCNAMEFEESSTARTDATETIDC201AGDCA120002018-07-02101C202ADCA150002018-07-15103C203DCA100002018-10-01102C204DDTP90002018-09-15 104C205DHN200002018-08-01101C206O LEVEL180002018-7-25105(i) To display the TNAME and CITY of Trainer who joined the Institute in the month of December 2001.(ii) To display TNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER and COURSE of all those courses whose FEES is less than or equal to 10000.

Answer»

(i)  SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE BETWEEN ‘2001-12-01’ AND ‘2001-12-31’; OR

SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE >= ‘2001-12-01’ AND HIREDATE<=‘2001-12-31’;

OR

SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE LIKE ‘2001-12%’;

(ii)  SELECT TNAME,HIREDATE,CNAME,STARTDATE FROM TRAINER, COURSE WHERE TRAINER.TID=COURSE.TID AND FEES<=10000;

5295.

Observe the following table and answer the parts(i) and(ii) accordinglyTable:ProductPnoNameQtyPurchaseDate101Pen10212-12-2011102Pencil20121-02-2013103Eraser9009-08-2010109Sharpener9031-08-2012113Clips90012-12-2011(i) Write the names of most appropriate columns, which can be considered as candidate keys.(ii) What is the degree and cardinality of the above table?

Answer»

(i) Candidate Key: Pno, Name

(ii) Degree:4

Cardinality:5

5296.

Write the definition of a member function Ins_Player() for a class CQUEUE in C++, to add a Player in a statically allocated circular queue of PLAYERs considering the following code is already written as a part of the program:struct Player{long Pid;char Pname[20];};const int size=10;class CQUEUE{Player Ar[size];int Front, Rear;public:CQUEUE( ){Front = -1;Rear=-1;}void Ins_Player(); // To add player in a static circular queuevoid Del_Player(); // To remove player from a static circular queuevoid Show_Player(); // To display static circular queue};

Answer»

void CQUEUE : : Ins_Player( )

{

if((Front==0 && Rear==size-1) || (Front==Rear+1)

{

cout<< “Overflow”;

return;

}

else if(Rear = = -1)

{

Front=0;

Rear=0;

}

else if(Rear= =size-1)

{

Rear=0;

}

else

{

Rear++;

}

cout<< “Enter Player Id=”;

cin>>Ar[Rear].Pid;

cout<< “Enter Player Name=”;

gets(Ar[Rear].Pname);

}

5297.

Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables.TRAINERTIDTNAMECITYHIREDATESALARY101SUNAINAMUMBAI1998-10-1590000102ANAMIKADELHI1994-12-2480000103DEEPTICHANDIGARG2001-12-2182000104MEENAKSHIDELHI2002-12-2578000105RICHAMUMBAI1996-01-1295000106MANIPRABHACHENNAI2001-12-1269000COURSECIDCNAMEFEESSTARTDATETIDC201AGDCA120002018-07-02101C202ADCA150002018-07-15103C203DCA100002018-10-01102C204DDTP90002018-09-15104C205DHN200002018-08-01101C206O LEVEL180002018-07-25105(i) Display the Trainer Name, City &amp; Salary in descending order of their Hiredate.(ii) To display the TNAME and CITY of Trainer who joined the Institute in the month of December 2001.(iii) To display TNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER and COURSE of all those courses whose FEES is less than or equal to 10000.(iv) To display number of Trainers from each city.(v) SELECT TID, TNAME, FROM TRAINER WHERE CITY NOT IN(‘DELHI’, ‘MUMBAI’);(vi) SELECT DISTINCT TID FROM COURSE;(vii) SELECT TID, COUNT(*), MIN(FEES) FROM COURSE GROUP BY TID HAVING COUNT(*)&gt;1;(viii) SELECT COUNT(*), SUM(FEES) FROM COURSE WHERE STARTDATE&lt; ‘2018-09-15’;

Answer»

(i) SELECT TNAME, CITY, SALARY FROM TRAINER ORDER BY HIREDATE;

(iii) SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE BETWEEN ‘2001-12-01’ AND ‘2001-12-31’;

OR

SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE >= ‘2001-12-01’ AND HIREDATE<=‘2001-12-31’;

OR

SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE LIKE ‘2001-12%’;

(iii) SELECT TNAME, HIREDATE, CNAME, STARTDATE FROM TRAINER, COURSE WHERE TRAINER.TID=COURSE.TID AND FEES<=10000;

(iv) SELECT CITY, COUNT(*) FROM TRAINER GROUP BY CITY;

(v) TIDTNAME

103   DEEPTI

106   MANIPRABHA

(vi) DISTINCT TID

101

103

102

104

105

(vii) TIDCOUNT(*)MIN(FEES)

101   2   12000

(viii) COUNT(*)SUM(FEES)

4    65000

5298.

Write a function in C++ to delete a node containing Books information ,from a dynamically allocated stack of Books implemented with the help of the following structure:struct Book{int BNo;char BName[20];Book *Next;};

Answer»

struct Book

{

int BNo;

char BName[20];

Book *Next;

}*temp,*top;

void pop()

{

temp=new Book ;

temp=top;

top=top->next;

delete temp;

}

5299.

Write a function RevText() to read a text file “ Input.txt “ and Print only word starting with ‘I’ in reverse order .Example: If value in text file is: INDIA IS MY COUNTRYOutput will be: AIDNI SI MY COUNTRY

Answer»

void RevText( )

{

ifstream Fin(“Input.txt”);

char Word[20];

while(!Fin.eof())

{

Fin>>Word;

if(Word[0]==’I’)

strrev(Word);

cout<<Word<< “ ”;

}

Fin.close( );

}

5300.

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.A/B+C*(D-E)

Answer»
ElementStackPostfix
AA
//A
B/AB
++AB/
C+AB/C
*+*AB/C
(+*(AB/C
D+*(AB/CD
-+*(-AB/CD
E+*(-AB/CDE
)+*AB/CDE-
+AB/CDE-*
AB/CDE-*+