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's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }
What is structure in c language?
If we give two names then this displays the connection between the two people. It is nothing but flames game
Write a program to show the workingof auto variable.
What is Your Name :)
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
could u able to tell about suresoft technical session
Why does everyone say not to use gets?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What are the types of i/o functions?
What is non linear data structure in c?