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 |
main() { int i; for(i=0;i<5;i++) printf("%d",1l<<i); } why doesn't 'l' affect the code??????
int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain me output????
difference between object file and executable file
Write a program to print all the prime numbers with in the given range
8 Answers ABC, College School Exams Tests, TCS,
What is C++
What are the types of data types and explain?
How do I convert a string to all upper or lower case?
what different between c and c++
Explain the use of 'auto' keyword
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?
write a c program in such a way that if we enter the today date the output should be next day's date.
What are the types of macro formats?