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

 A distributed database is which of the following?

A) A single logical database that is spread to multiple locations and is interconnected by a network B) A loose collection of file that is spread to multiple locations and is interconnected by a network
C) A single logical database that is limited to one location. D) A loose collection of file that is limited to one location.
 
Answer & Explanation Answer: A) A single logical database that is spread to multiple locations and is interconnected by a network

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

1 3916
Q:

Which of the following is not true about listening?

A) It involves conscious psychological action. B) Attention and meaning given to sounds turns hearing in to listening.
C) It is a passive, constant process. D) It is an active and selective process.
 
Answer & Explanation Answer: C) It is a passive, constant process.

Explanation:
Report Error

View Answer Report Error Discuss

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

2 3916
Q:

Who gave the slogan 'Back to the Vedas (Vedo ki aur lauto)'?

A) Guru Nanank Dev Ji B) Dayanand Saraswati
C) Swami Vivekananda D) Raja Ram Mohan Roy
 
Answer & Explanation Answer: B) Dayanand Saraswati

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

1 3915
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 3914
Q:

Who is the 45th President of United States ?

A) Hillary Clinton B) Barack Obama
C) George W. Bush D) Donald Trump
 
Answer & Explanation Answer: D) Donald Trump

Explanation:

Donald John Trump (born June 14, 1946) is an American businessman, television personality, politician, and the 45th President of the United States.

Report Error

View Answer Report Error Discuss

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

3 3914
Q:

Prokaryotic cells lack

A) Membrane bound by organelles B) Nucleolus
C) Nuclear membrane D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

Prokaryotic cells lack a nucleus and do not have an extensive system of interior membranes. They are encased in a cell wall and many contain external structures such as a capsule, flagellum, or pili. Prokaryotes – have a relatively uniform interior that is not subdivided by internal membranes.

Report Error

View Answer Report Error Discuss

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

6 3914
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 3914