Home » How to Write C Program Without Header File

How to Write C Program Without Header File

Learn about How to Write C Program Without Header File in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.

In general, we include at least one header file stdio.h in every C program. The printf and scanf functions that we use frequently in our software are specified in the stdio.h header file. The inclusion of stdio.h serves to add the definition of these functions to our program. Using the C preprocessor, we can extract the printf function definition from the header file and utilize it directly in our program.

Write C Program Without Header File


int printf(const char *format, ...); //Declare the printf() function
int main()
{
    printf( "Welcome to similar geeks....!" );
    return 0;
}

Output:

Welcome to similar geeks….!

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Codes :
C Program to Get Process ID and Parent Process ID
C Program to Print Hello World Without Using Semicolon(Command-line Arguments)