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

Who invented Electrocardiograph(EKG)?

Answer

The EKG was invented by Willem Einthoven in 1903 and is used to monitor and analyze past and present heart activity in an individual.

Report Error

View answer Workspace Report Error Discuss

Subject: Inventions

5 3781
Q:

March 21 is observed as.......

A) World Environment Day B) World Forestry Day
C) World Greenary Day D) None of these
 
Answer & Explanation Answer: B) World Forestry Day

Explanation:
Report Error

View Answer Report Error Discuss

1 3780
Q:

The oldest form of composition of Hindustan Vocal music is

A) Thumri B) Ghazal
C) Dhrupad D) None of the above
 
Answer & Explanation Answer: C) Dhrupad

Explanation:
Report Error

View Answer Report Error Discuss

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

28 3779
Q:

Which among the following are the components of windows registry?

A) Keys B) SubKeys
C) Values D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

All the above listed are the components of Windows registry

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems

0 3778
Q:

What is the capital of Peru?

A) Warsaw B) Lima
C) Dakar D) Victoria
 
Answer & Explanation Answer: B) Lima

Explanation:

Lima is the capital of Peru

Report Error

View Answer Report Error Discuss

Filed Under: Country Capitals

10 3777
Q:

' In CUstody ' , an english novels, is written by which one of the following

A) Vikram Seth B) Shoba De
C) Anita Desai D) VS.Naipaul
 
Answer & Explanation Answer: C) Anita Desai

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

4 3777
Q:

Who is the author of the Book 'Social Exclusion and Justice in India'?

A) Rakesh Kumar B) Arun Singh
C) M. Venkaiah Naidu D) P.S. Krishnan
 
Answer & Explanation Answer: D) P.S. Krishnan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

8 3777