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 3790
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 3790
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 3787
Q:

Who has become First Female Pilot in Indian Navy?

A) Ritu Kumari B) Shubhangi Swaroop
C) Garima Sharma D) Rakhi Kumari
 
Answer & Explanation Answer: B) Shubhangi Swaroop

Explanation:

Shubhangi Swaroop, the First Woman Pilot inducted into Indian Navy.

Report Error

View Answer Report Error Discuss

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

11 3787
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 3786
Q:

I am an English word which starts with 'T' and ends with 'T' and has 'T' in it.

Answer

The English word that starts & ends with T and has T (Tea) in it is " TEAPOT ".


teapot1586508959.jpg image


 

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles Exam Prep: CAT , Bank Exams

4 3786
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 3785
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 3785