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 3793
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 3792
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 3791
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 3790
Q:

Which team did Sachin Tendulkar paly for in the Ranji Trophy when he made his debut in first class cricket

A) Karnataka B) Delhi
C) Mumbai D) kerala
 
Answer & Explanation Answer: C) Mumbai

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports

2 3789
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 3789
Q:

If I use the following printf() to print a long int why I am not warned about the type mismatch?

printf ("%d",num );

Answer

When a function accepts a variable number of arguments , its prototype cannot provide any information about the number of arguments and type of those variable arguments. Hence the compiler cannot warn about the mismatches. The programmer must make sure that arguments match or must manually insert explicit typecast.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 3789
Q:

Each hemoglobin molecule can transport two molecules of oxygen.

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

FALSE. Each hemoglobin molecule can transport four molecules of oxygen.


 


Hemoglobin, or Hb, is a protein molecule found in red blood cells (erythrocytes) made of four subunits: two alpha subunits and two beta subunits. Heme the component of hemoglobin responsible for binding oxygen consists of an iron ion that binds oxygen and a porphyrin ring that binds the globin molecules, one molecule binds one molecule of oxygen and can bind up to four oxygen molecules.

Report Error

View Answer Workspace Report Error Discuss

Subject: Biology
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 3789