Difference between Normal function and Macro Funcion Normal function is defined : return_type function_name(arguments) { //coding } Macro function: #define funtion_name(arguments) coding Differ... Read More
Difference between #include and #include "stdio.h" Many of you confused with this two method of specifying the include files. This article will teach you what the difference between these tw... Read More
Predict the Output #define tech(a,b) a##b##a int main() { if(printf("%d",tech(4,0))) { } return 0; } Output: 404 Read about Macro Read More
70 #define les(a,b) a<b?a:b int main() { int i=1,j=3,k; k=les(i++,++j); printf ("%d %d %d",i,j,k); return 0; } Output: 3... Read More
61 Predict the output: int main() { struct shark { int b; #define selva() b }s; s.selva() =4; printf ("%d",s.b); return 0; }... Read More
58 #define ft(a,b) (a)*b int main () { printf ( "%d" , ft(2+1,3+1 ); return 0; } Output: 10 Logic: function is replaced with const... Read More
56 In the following program which one will run without any errors?: #define a 2 int main() { int b=2; switch(b) { case a: printf("%d"... Read More
50 #ifdef NULL #define NULL 2 #endif #ifndef NULL #define NULL 4 #end if int main() { printf("%d",++NULL^NULL|0); return 0; } Output:... Read More
49 #define shark(a,e,i,o,u,s,r) u##r##i##e #define srini shark(z,n,i,t,m,k,a) int srini(int a) { printf("%d",a); return 0; } int main... Read More
46 #define float char int function(char a) { if(a return function(a+8); printf("%c",a+32); return 0; } int main() { float b='\n... Read More
36 #define max 4 int main() { int i; for(i=0;i { printf("%d",i); max=max+i; } } Output compilation Error. Read More
29 #includedeny stdio.h > #define shark(s) printf("%d",s); #define srini(b) b-1 int main() { shark(2*srini(2)) } Output: 3 Read More