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 3932
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 3931
Q:

"Tigris River" flows through which of the following countries ?

A) Iran B) Italy
C) Iraq D) Egypt
 
Answer & Explanation Answer: A) Iran

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

16 3931
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 3931
Q:

Which continent has the most countries?

A) Asia B) Africa
C) Antarctica D) Europe
 
Answer & Explanation Answer: B) Africa

Explanation:

We know that, there are 7 continents in the world. They are :

Asia, Africa, Australia, North America, South America, Europe and Antarctica.

 

Africa - 53 countries

Asia - 48 countries

Europe - 45 countries

Antarctica - 0 countries

 

Hence, the continent Africa has most number of countries with 53 countries and in second place Asia has 48 , third Europe has 45 countries.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

7 3931
Q:

National Institute of Aeronautical Engineering is located at

A) Lucknow B) Dehradun
C) Kanpur D) Bangalore
 
Answer & Explanation Answer: B) Dehradun

Explanation:

National_Institute_of_Aeronautical_Engineering_is_located_at1552113412.jpg image

National Institute of Aeronautical Engineering is located at Dehradun, Uttaranchal, India.

Report Error

View Answer Report Error Discuss

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

2 3930
Q:

Malleability and Ductility of metals can be accounted due to

A) the crystalline structure in metal B) the interaction of electrons with metal ions in the lattice
C) the presence of electrostatic force D) the capacity of layers of metal ions to slide over the other
 
Answer & Explanation Answer: D) the capacity of layers of metal ions to slide over the other

Explanation:
Report Error

View Answer Report Error Discuss

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

4 3930
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 3930