C

How To write a C Program without the main Function1 min read

Here we have a c program which looks like it has no main function.

Can we write a C Program without the main function? the answer is No.




The main function is the entry point of your program, or in simple words from the main function your program starts execution.

But we can use the C PreProcessor and write a c program which looks like it doesn’t contain amain function.

Example C Program to mimic no main function

Output:

Hello World

Leave a Comment