Questions

Q:

I act like a cat I look like a cat Yet I am not a cat. What am I?

Answer

A Kitten.

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles Exam Prep: Bank Exams

12 4090
Q:

How would you use qsort() function to sort an array of structures?

Answer

#include "string.h"


#include "stdlib.h"


struct stud


{


       int rollno;


       int marks;


       char name[30];


};


int sort_m (struct stud *, struct stud *);


int sort_name (struct stud *, struct stud *);


int sort_marks (struct stud *, struct stud *);


 


main()


{


static struct stud ss[] = {


                                            { 15, 96, "Akshay" },


                                            { 2, 97, "Madhuri" },


                                            { 8, 85, "Aishvarya" },


                                            { 10, 80, "Sushmita" }


                                   };


int x,w;


clrscr();


w = sizeof (struct stud);


 


printf ('\nIn order of roll numbers:");


qsort (ss, 4, w, sort_rn);


for(x=0; x<4;x++)


     printf ("\n%d%s%d", ss[x].rollno, ss[x].name,ss[x].marks);


 


printf("\n\nIn order of names:");


qsort(ss, 4, sort_name);


 


for (x=0; x<4;x++)


      printf("\n%d%s%d",ss[x].rollno, ss[x].name,ss[x].marks);


printf("\n\nIn order of marks:");


qsort(ss,4,w,sort_marks);


 


for (x=0;x<4;x++)


      printf ("\n%d%s%d",ss[x].rollno,ss[x].name,ss[x].marks);


}


int sort_rn (struct stud *t1, struct stud *t2)


{


     return (t1->rollno-t2->rollno);


}


 


int sort_name (struct stud *t1, struct stud *t2)


{


     return (strcmp(t1->name,t2->name));


}


int sort_marks (struct stud *t1, struct stud *t2)


{


     return (t2->marks-t1->marks);


}


 


 


 

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 4087
Q:

A research team of 6 people is to be formed from 10 chemists,5 politicians, 8 economists and 15 biologists.How many teams have atleast 5 chemists?

A) 7350 B) 6400
C) 6379 D) 7266
 
Answer & Explanation Answer: D) 7266

Explanation:

10C5 x 28C1 x 10C6 = 7266

Report Error

View Answer Report Error Discuss

0 4087
Q:

Which interrupts is not level-sensitive in 8085?

Answer

TST 7.5 is a raising edge-triggering interrupt.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

2 4085
Q:

The oldest known organic compound is

A) Urea B) Methane
C) Acetic acid D) Benzene
 
Answer & Explanation Answer: C) Acetic acid

Explanation:

In the form of vinegar, acetic acid is known from very early times. It is got by oxidation of fermented liquors (10-15%, alcohol) by air under the influence of a bacteria called 'mycoderma acetic'

Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

4 4085
Q:

Customer Perceptions and Business Outcomes help to define what ?

A) Key Performance Indicators (KPI's) B) Service Value
C) Total Cost of Ownership (TCO) D) Governance
 
Answer & Explanation Answer: B) Service Value

Explanation:
Report Error

View Answer Report Error Discuss

6 4084
Q:

National Commission for Backward Classes was set up in 

A) 1991 B) 1992
C) 1993 D) 1994
 
Answer & Explanation Answer: C) 1993

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

6 4084
Q:

A balloon filled with hydrogen will

A) continue going upwards uninterrupted B) reach a particular height and remain floating
C) burst after reaching some height D) reach a particular height and start coming down
 
Answer & Explanation Answer: B) reach a particular height and remain floating

Explanation:

It will stop at a height where the weight of the balloon with contents is equal to the weight of air displaced by it, i.e , when the upthrust is equal to the downthrust. The question of bursting will depend on how much difference of pressure inside and outside , the material of the balloon can withstand. It is assumed the balloon is filled with a lighter than air gas like hydrogen or helium.

Report Error

View Answer Report Error Discuss

Filed Under: Physics

2 4083