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

With which of the following is the term Liberty, Equality and Fraternity associated?

A) Industrial Revolution B) Russian Revolution
C) French Revolution D) Olympic Games
 
Answer & Explanation Answer: C) French Revolution

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History

3 3864
Q:

Cache memory is a form of ROM.

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

Explanation:

The given sentence Cache memory is a form of ROM is FALSE. Cache memory, also called CPU memory, is high-speed static random access memory (SRAM) that a computer microprocessor can access more quickly than it can access regular random access memory (RAM).

Report Error

View Answer Workspace Report Error Discuss

1 3863
Q:

At what temperature do the Fahrenheit and celcius scales give the same reading?

A) 212 degrees B) 32 degreees
C) -40 degreees D) 0 degreees
 
Answer & Explanation Answer: C) -40 degreees

Explanation:

We want the temperature when F=C.

We know that, F = C x 95 + 32

So substituting C For F, we have C = -40o

Therefore,  C = -40. 

Thus when C = -40, we have C = F

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: CAT , AIEEE
Job Role: Bank PO

17 3863
Q:

The first martyrdom in Sikh history in the reign of Jehangir was of

A) Guru Ram Das B) Guru Teg Bahadur
C) Guru Angad D) Guru Arjan
 
Answer & Explanation Answer: D) Guru Arjan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

1 3862
Q:

A person who believes in fate

A) Predestinarianist B) Determinist
C) Fatalist D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

A person who believes in fate is called as Fatalist or also called as Determinist or Predestinarianist.

Report Error

View Answer Report Error Discuss

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

1 3862
Q:

Rutherford's alpha-scattering experiment related to the size of the

A) nucleus B) atom
C) electron D) neutron
 
Answer & Explanation Answer: A) nucleus

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

2 3862
Q:

Circuit breaker usually operate under

A) after D. C. component has ceased B) transient state of short-circuit current
C) sub-transient state of short-circuit current D) steady state of short-circuit current
 
Answer & Explanation Answer: B) transient state of short-circuit current

Explanation:
Report Error

View Answer Report Error Discuss

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

4 3861