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 |
Write a C program to fill a rectangle using window scrolling
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
2 Answers Aricent, Manipal University,
What is chain pointer in c?
What is malloc() function?
Why can't I perform arithmetic on a void* pointer?
What is break in c?
write a statement to display all the elements array M(in reverse order? int M[8]={20,21,22,23,24,25,26,27};
prog for 1st five prime numbers in 2^x - 1
Explain enumerated types in c language?
hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a
Can you please explain the difference between strcpy() and memcpy() function?
Do pointers need to be initialized?