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
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 |
How are variables declared in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
In a header file whether functions are declared or defined?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
Finding first/last occurrence of a character in a string without using strchr( ) /strrchr( ) function.
What do you mean by dynamic memory allocation in c? What functions are used?
HOW TO SWAP TWO NOS IN ONE STEP?
What are the types of c language?
write a statement to display all the elements array M(in reverse order? int M[8]={20,21,22,23,24,25,26,27};
What is a C array and illustrate the how is it different from a list.
when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none
main() { char *p; p="Hello"; printf("%c\n",*&*p); }