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

How are variables declared in c?

0 Answers  


what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }

1 Answers   Motorola,


What is structure in c language?

0 Answers  


If we give two names then this displays the connection between the two people. It is nothing but flames game

1 Answers  


Write a program to show the workingof auto variable.

2 Answers   Infotech,






What is Your Name :)

1 Answers  


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

0 Answers  


could u able to tell about suresoft technical session

1 Answers  


Why does everyone say not to use gets?

0 Answers  


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

0 Answers  


What are the types of i/o functions?

0 Answers  


What is non linear data structure in c?

0 Answers  


Categories