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 3858
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:

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:

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 3856
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 3856
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 3855
Q:

World hemophilia day is observed globally on ___________.

A) 18 April B) 15 April
C) 21 April D) 17 April
 
Answer & Explanation Answer: D) 17 April

Explanation:

World hemophilia day is observed globally on 17 April.

Report Error

View Answer Report Error Discuss

Filed Under: Important Days and Years
Exam Prep: Bank Exams , CAT
Job Role: Bank PO

3 3855