Questions

Q:

How would you check whether the contents of two structure variables are same or not?

Answer

struct emp


{


     char n[20];


      int age;


};


main()


{


    struct emp e1 = {"Dravid", 23};


   struct emp e2;


   scanf ("%s %d",e2.n, & e2.age);


   if( structcmp (e1,e2) ==0)


        printf ("The structures are equal");


   else


         printf ("The structures are unequal");


}


structcmp ( struct emp x, struct emp y)


{


     if (strcmp (x.n,y.n) ==0)


           if (x.age == y.age)


            return (0);


            return (1);


}


In short, if you nee to compare two structures, you'll have to write your own function to do so which carries out the comparison field by field.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 3915
Q:

Who gave the slogan 'Back to the Vedas (Vedo ki aur lauto)'?

A) Guru Nanank Dev Ji B) Dayanand Saraswati
C) Swami Vivekananda D) Raja Ram Mohan Roy
 
Answer & Explanation Answer: B) Dayanand Saraswati

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

1 3913
Q:

The Indian Football team made its first appearance at Olympicsin

A) 1936 B) 1948
C) 1952 D) 1956
 
Answer & Explanation Answer: B) 1948

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports

3 3912
Q:

Planets do not twinkle because

A) Far distance B) Total internal reflection
C) Refraction D) Near distance
 
Answer & Explanation Answer: D) Near distance

Explanation:

Stars twinkle because they’re so far away from Earth that when light from the stars passes through the atmosphere, it is bent countless times due to refraction, making it look like as if they were blinking. The sun and other planets doesn’t twinkle because it’s too close to Earth compared to other stars.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

3 3912
Q:

 A distributed database is which of the following?

A) A single logical database that is spread to multiple locations and is interconnected by a network B) A loose collection of file that is spread to multiple locations and is interconnected by a network
C) A single logical database that is limited to one location. D) A loose collection of file that is limited to one location.
 
Answer & Explanation Answer: A) A single logical database that is spread to multiple locations and is interconnected by a network

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

1 3912
Q:

Prokaryotic cells lack

A) Membrane bound by organelles B) Nucleolus
C) Nuclear membrane D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

Prokaryotic cells lack a nucleus and do not have an extensive system of interior membranes. They are encased in a cell wall and many contain external structures such as a capsule, flagellum, or pili. Prokaryotes – have a relatively uniform interior that is not subdivided by internal membranes.

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

6 3912
Q:

Ultimate strength to cement is provided by

A) Di-calcium silicate B) Tricalcium silicate
C) Tetra calcium alumino ferrite D) Tri-calcium aluminate
 
Answer & Explanation Answer: A) Di-calcium silicate

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams , GATE
Job Role: Analyst , Bank Clerk , Bank PO

2 3912
Q:

Bhatnagar Prize is given in the field of

A) Peace B) Music and dance
C) Science and Technology D) Fine arts
 
Answer & Explanation Answer: C) Science and Technology

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 3911