QUIZ 32

What will be the output?

a. Values are a=2, b=2.670000
b. Values are a=2.670000, b=2
c. Garbage values
d. Error

Answer : (d)

Error occurs because a structure of different type is assigned to a structure of different type. Although, they are having similar elements, they are distinct.
Correct assignments should be:
t1.a=s2.a;
t1.b=s2.b;

Leave a Reply

Your email address will not be published. Required fields are marked *