Questions

Q:

Who invented logarithms?

A) Mandeleef B) Shockley
C) Amundson D) John Napier
 
Answer & Explanation Answer: D) John Napier

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions

2 3883
Q:

Jamini Roy is a famous

A) Dancer B) Magician
C) Cartoonist D) Painter
 
Answer & Explanation Answer: D) Painter

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

4 3883
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 3883
Q:

Taj Hotels has entered into a marketing alliance with The Shilla Hotels & Resorts of Korea. Shilla Hotels is affiliated to which industrial group?

A) Hyundai B) LG
C) Samsung D) Daewoo
 
Answer & Explanation Answer: C) Samsung

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

11 3882
Q:

India has ranked _____ rank in World Bank's 'Ease of doing business' index.

A) 100 B) 101
C) 99 D) 102
 
Answer & Explanation Answer: A) 100

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

14 3882
Q:

The DBA can set the registry variable DB2_HASH_JOIN on or off because:

A) hash joins may require more resources to run. B) hash joins are not used unless outer joins are requested.
C) If hash joins are enabled, no other join method can be used. D) Hash joins are only needed when the tables are portioned using hash keys.
 
Answer & Explanation Answer: A) hash joins may require more resources to run.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: IBM Certification

5 3881
Q:

The normal blood pressure in human beings is

A) 80/120 B) 120/80
C) 80/110 D) 110/90
 
Answer & Explanation Answer: B) 120/80

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

8 3880
Q:

In a bisexual flower if androcium and gynoecium mature at different time the phenomeon is known as _________

A) Dichogamy B) Herpogamy
C) Haterogamy monogamy D) None of these
 
Answer & Explanation Answer: A) Dichogamy

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

10 3880