what is the output?
#define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t)
float gfloat;
main()
{
float a=1.12,b=3.14;
fun (a,b,float);
printf("na=%4.2f,b=%4.2f",a,b);
}
A)Error in Defining Macro
B)a=1.12,b=3.14
C)a=3.14,b=1.12
D)None of the Above

Answers were Sorted based on User's Feedback



what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { floa..

Answer / santhoo035

a=3.14,b=1.12

Is This Answer Correct ?    6 Yes 0 No

what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { floa..

Answer / subbu[iit kgp]

the given program as it gives errors, with some
modifications as

#define fun(a,b,t) g ##t=(a);(a)=(b);(b)=g##t
float gfloat;
main()
{
float a=1.12,b=3.14;
fun(a,b,float);
printf("a=%4.2f,b=%4.2f",a,b);
}

gives the output as option c

Is This Answer Correct ?    4 Yes 1 No

what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { floa..

Answer / deepa

option c

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is clrscr ()?

0 Answers  


Explain union. What are its advantages?

0 Answers  


what is difference between declaring the pointer as int and char in c language?

3 Answers  


What is the use of printf() and scanf() functions?

0 Answers  


How can I manipulate strings of multibyte characters?

0 Answers  






What is the difference between volatile and const volatile?

0 Answers  


What is external variable in c?

0 Answers  


how to find sum of 5 digits in C?

4 Answers  


While(1) { } when this loop get terminate is it a infinite loop?

5 Answers  


what is the difference between postfix and prefix unary increment operators?

3 Answers  


what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7

4 Answers   TCS,


write a c program that prints all multiples of 3between 1 and 50.

5 Answers  


Categories