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

Who was awarded the first Rajiv Gandhi National Sadhavana Award

A) Archarya Tulsi B) J.R.D.Tata
C) Mother Teresa D) R.A.Mashelkar
 
Answer & Explanation Answer: C) Mother Teresa

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards

1 3813
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 3813
Q:

According to Forbes, Who has become Asia’s richest person in the year 2017?

A) Jeff Bezos B) Hui Ka Yan
C) Mukesh Ambani D) Bill Gates
 
Answer & Explanation Answer: C) Mukesh Ambani

Explanation:

Reliance Industries Chairman Mukesh Ambani overtook China’s Hui Ka Yan to become Asia’s richest person with a total wealth of $42.1 billion. According to Forbes’ real time billionaire’s list, Ambani's personal wealth rose by $466 million in 2017.

Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

9 3812
Q:

Which pair consists of negative symptoms of schizophrenia?

Which_pair_consists_of_negative_symptoms_of_schizophrenia1539324076.jpg image

A) blunted affect and delusions B) delusions and hallucinations
C) withdrawal and flat affect D) abolition and hallucinations
 
Answer & Explanation Answer: D) abolition and hallucinations

Explanation:

Abolition and hallucinations is the pair that consists of negative symptoms of schizophrenia.

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

1 3812
Q:

Anything that has Mass and takes up Space-

A) System B) Matter
C) Energy D) Weight
 
Answer & Explanation Answer: B) Matter

Explanation:

Anything that has Mass and takes up Space is called Matter.

 

Matter has some mass and occupies some space. Mass means the amount of matter in an object. Space occupied by an object is called its Volume.

 

The Study of Matter and and how matter changes is called Chemistry.

Report Error

View Answer Report Error Discuss

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

9 3811
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 3810
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 3810