Friday, March 5, 2010

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()
{
char a=56;
srini(a+32);
}

Output:


Compilation Error

Logic:


we can't define two main functions. but now you may ask where the another main function. srini function is equal to main function. How?
to know click here

3 comments:

#define shark(a,e,i,o,u,s,r) u##s##r##t
#define srini shark(z,n,i,t,m,k,a)
int srini(int a)
{
printf("%d",a);
return 0;
}
int main()
{
char a=56;
srini(a+32);
}


working

Please understand the logic friend... You made mistake in merging....

U##r##i##e is in my program. U##s##r##t is in your program.. Both are not equal.. Read my " without main post" to understand the logic

Post a Comment