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 struct padding needed?
In a switch statement, explain what will happen if a break statement is omitted?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
What are 'near' and 'far' pointers?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
What are the types of data types and explain?
What is line in c preprocessor?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
What is the acronym for ansi?
Where static variables are stored in c?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
What is c language and why we use it?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What are categories used for in c?
How to delete a node from linked list w/o using collectons?