C Program without a main() Function

31 May 2012




#include<stdio.h>
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)
int begin()
{
printf(” hello “);
}
// Working : according to the macro definition of the second line decode(a,n,i,m,a,t,e)
// must be expanded int
// o m##a##i##n (4th,1st,3d 2nd) characters Hence in the expanded source code(the source
// code after being processed by preprocessor and passed on to compiler)
//“begin” is eventually replaced by “main”


Incoming Search:
c programming, c program without main(), c without main(), write a c program without main(), how to write a c program without main()
Share this article on :

1 comments:

sanjeev kumar said...
This comment has been removed by the author.

Post a Comment

 
© Copyright 2010-2011 Tech Google All Rights Reserved.