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
Why is it that not all header files are declared in every C program?
What is d'n in c?
What is unary operator?
What are the basic data types associated with c?
number of times a digit is present in a number
Why & is used in scanf in c?
What is the correct code to have following output in c using nested for loop?
How can I recover the file name given an open stream?
What are run-time errors?
What are the types of type qualifiers in c?
Why doesnt that code work?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What is adt in c programming?
Are bit fields portable?
How can I trap or ignore keyboard interrupts like control-c?