Questions

Q:

Where does the chemical reactions called Mellaird reaction takes place?

Answer

In cooking

Report Error

View answer Workspace Report Error Discuss

Subject: General Science

14 3901
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 3900
Q:

The vitamin required for coagulation of blood

A) B6 B) c
C) k D) b
 
Answer & Explanation Answer: C) k

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

8 3900
Q:

A gas is found to have the formula . Its vapour density is 70.The value of n must be

A) 5 B) 4
C) 9 D) 6
 
Answer & Explanation Answer: A) 5

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

3 3900
Q:

The Supreme Court has reconstituted the special Investigation Team(SIT) to expedite probe into Black Money Cases and directed the government to issue the necessary notification. Who of the following is the chairman of this team?

A) Arijit Pasayat B) M.B.Shah
C) R.M.Lodha D) Vinod Rai
 
Answer & Explanation Answer: B) M.B.Shah

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

3 3899
Q:

India's largest telecom operator Bharti Airtel announced a partnership with __________ to provide cyber security solutions to businesses in India.

A) Symantec Corp B) Mimecast
C) Cisco D) Raytheon
 
Answer & Explanation Answer: A) Symantec Corp

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

6 3898
Q:

[(24)2+(27)2]÷? = 9.0625

A) 121 B) 144
C) 169 D) 81
 
Answer & Explanation Answer: B) 144

Explanation:
Report Error

View Answer Report Error Discuss

4 3896
Q:

MS Kim Campbell is the first Prime Minister of

A) Congo B) Canada
C) Portugal D) Phillippines
 
Answer & Explanation Answer: B) Canada

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

0 3894