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



what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { floa..

Answer / santhoo035

a=3.14,b=1.12

Is This Answer Correct ?    6 Yes 0 No

what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { floa..

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

what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { floa..

Answer / deepa

option c

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Write a C program to fill a rectangle using window scrolling

1 Answers  


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

2 Answers   Aricent, Manipal University,


What is chain pointer in c?

0 Answers  


What is malloc() function?

0 Answers  


Why can't I perform arithmetic on a void* pointer?

0 Answers  






What is break in c?

0 Answers  


write a statement to display all the elements array M(in reverse order? int M[8]={20,21,22,23,24,25,26,27};

5 Answers  


prog for 1st five prime numbers in 2^x - 1

0 Answers  


Explain enumerated types in c language?

0 Answers  


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

1 Answers  


Can you please explain the difference between strcpy() and memcpy() function?

0 Answers  


Do pointers need to be initialized?

0 Answers  


Categories