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

Who is representing India at the 2017 Little Miss Universe competition  ?

A) Vinita Sayal B) Nandita Das
C) Rajeshwari Dyal D) Padmalaya Nanda
 
Answer & Explanation Answer: D) Padmalaya Nanda

Explanation:

Padmalaya Nanda from Odisha will represent India at the 2017 Little Miss Universe beauty pageant competition, which is scheduled to be held in Georgia, United States from May 31. She will compete against 15 other contestants from around the world for the title of Little Miss Universe. Beside this, she will also lead India in the 2017 Little Miss World contest in Greece.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

3 3799
Q:

Which of the following national parks of India is also a UNESCO world heritage site ?

A) Keoladeo national park B) Jim Corbett national park
C) Namdapha national park D) Keibul Lamjao national park
 
Answer & Explanation Answer: A) Keoladeo national park

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

8 3798
Q:

Which of the following layers of the earth is believed to have the heavist mineral materials of highest density

A) Central core B) Crust
C) Mantle D) Both (B) and (C)
 
Answer & Explanation Answer: A) Central core

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

0 3798
Q:

Which company's name in Italian means 'to roll'?

A) Vauxhall B) Honda
C) Volvo D) Michelin
 
Answer & Explanation Answer: C) Volvo

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

12 3797
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 3797
Q:

' Crime and Punishment ' was written by

A) Alexander Solzhenitysn B) Lewis Carroll
C) Fyodor Dostoevsky D) Valdimir Nabakov
 
Answer & Explanation Answer: C) Fyodor Dostoevsky

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 3797
Q:

International Workers' Day or Labour Day is celebrated on ?

A) April 1st B) May 1st
C) June 1st D) July 1st
 
Answer & Explanation Answer: B) May 1st

Explanation:
  • International Workers' Day, also known as Labour Day in some countries, is a celebration of labourers and the working classes that is promoted by the international labour movement, socialists, communists or anarchists. 
  • It occurs every year on May Day which is May 1st. It is the day to pay tribute to the Labourers. Without them nothing will complete. 
  • In India, the first Labour Day, or May Day, was celebrated in 1923 in Chennai.
Report Error

View Answer Report Error Discuss

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

2 3797