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
Answer Posted / 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 |
Post New Answer View All Answers
write a proram to reverse the string using switch case?
How is = symbol different from == symbol in c programming?
What is meant by gets in c?
What is the concatenation operator?
What is difference between structure and union in c programming?
Can you please explain the difference between syntax vs logical error?
Can we declare variables anywhere in c?
Can a pointer be static?
what is the significance of static storage class specifier?
List a few unconditional control statement in c.
Explain the difference between malloc() and calloc() function?
Explain what is the most efficient way to store flag values?
When should I declare a function?
What is action and transformation in spark?
How is null defined in c?