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 3860
Q:

With which of the following is the term Liberty, Equality and Fraternity associated?

A) Industrial Revolution B) Russian Revolution
C) French Revolution D) Olympic Games
 
Answer & Explanation Answer: C) French Revolution

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History

3 3860
Q:

What has triggered the need for multitasking in PCs?

Answer

1. Increased speed and memory capacity of microprocessors together with the support for virtual memory and


2. Growth of client server computing

Report Error

View answer Workspace Report Error Discuss

1 3857
Q:

As per the recommendations of the 12th Finance Commission, what will be the Share of the State Govts in total shareable proceeds of Central taxes?

A) 15% B) 20.5%
C) 22% D) 30.5%
 
Answer & Explanation Answer: D) 30.5%

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

1 3857
Q:

The coldest planet in the solar system is ?

A) Venus B) Jupiter
C) Uranus D) Pluto
 
Answer & Explanation Answer: C) Uranus

Explanation:
Report Error

View Answer Report Error Discuss

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

2 3857
Q:

Which action is the best example of a direct observation?

A) listening to a cricket chirp at night and counting the number of chirps per minute B) determining the seal population of an island by counting seals in 10 square meters of the island
C) identifying which bird was present by the tracks that it leaves in the sand at a beach D) reading numbers on a heat sensor to conclude that there is a deer in the night woods
 
Answer & Explanation Answer: A) listening to a cricket chirp at night and counting the number of chirps per minute

Explanation:
Report Error

View Answer Report Error Discuss

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

4 3857
Q:

Rutherford's alpha-scattering experiment related to the size of the

A) nucleus B) atom
C) electron D) neutron
 
Answer & Explanation Answer: A) nucleus

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

2 3857
Q:

Which of the following countries is passing through a crisis called as "Darfur Humanitarian Crisis"?

A) Uganda B) Somalia
C) Sudan D) Sierra Leone
 
Answer & Explanation Answer: C) Sudan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

1 3856