C/C++ Program without Main() function

Ram Pothuraju

This is a simple  Program in C or C++ without the Main() function. This question is often asked in interviews.

Program without Main()

#define  main  my

void  my()
    printf("Programs and notes for mca");

What we have done here is that we have used the #define directive my as 'main'.
So where ever we need to use the main keyword we replace it with 'my'.


Post a Comment


Post a Comment (0)