Let’s start the discussion about How to write a program without main in c in the following Approaches.
As a result, we’ll utilize the preprocessor (a program that transforms source code before compilation) directive #define with parameters to make it appear as if the program runs without a main.
Contents
can we write a program without main in c ?
#include<stdio.h>
#define start main
void start()
{
printf("Hello, World!!!");
}
I hope the strategies listed above work for you. Happy coding and come back again.
Similar Post : How to set a pointer to an offset in c