Embed presentation
Download to read offline

![Run C Program Without Main Function
Conceptually C Program is meaningless without main Function . Every
Program Must have Main Function.
Main Function :
a] It is Entry Point of Every C Program.
b] All Predefined and User-defined Functions are called directly or
indirectly through the main.
c] So C Program Must have Main Function.
But I have decided not to write main and want to run C Program , How ?
We have 3 approaches of Writing C Program without using main().](https://image.slidesharecdn.com/cprogramtowritecprogramwithoutusing-170209173417/85/C-program-to-write-c-program-without-using-main-function-2-320.jpg)





This document discusses three ways to write a C program without using the main function. The first way uses the #define preprocessor directive to replace "begin" with "main". The second way uses the ## token merging operator in a #define to merge the characters "m", "a", "i", and "n" together. The third way uses an argumented macro to define a function called "begin" that serves the same purpose as main.

![Run C Program Without Main Function
Conceptually C Program is meaningless without main Function . Every
Program Must have Main Function.
Main Function :
a] It is Entry Point of Every C Program.
b] All Predefined and User-defined Functions are called directly or
indirectly through the main.
c] So C Program Must have Main Function.
But I have decided not to write main and want to run C Program , How ?
We have 3 approaches of Writing C Program without using main().](https://image.slidesharecdn.com/cprogramtowritecprogramwithoutusing-170209173417/85/C-program-to-write-c-program-without-using-main-function-2-320.jpg)



