Home  >  Article  >  Backend Development  >  In C language, print out 'Hello World' without using any header file

In C language, print out 'Hello World' without using any header file

WBOY
WBOYforward
2023-08-26 09:37:02885browse

在C语言中,不使用任何头文件打印出“Hello World”

Usually, we use header files in C/C language to access built-in functions, such as int, char, and string functions. The function printf() is also a built-in function, which is declared in the "stdio.h" header file and is used to print any type of data on the console.

The following is a sample code for printing in C language without using a header file:

Sample code

int printf(const char *text, ...);
int main() {
   printf( "Hello World" );
   return 0;
}

Output

Hello World
In the above program, we pass Declare the printf() function and print "Hello World" in the program without using any header file. The declaration of the printf() function is as follows
int printf(const char *text, ...);

The above is the detailed content of In C language, print out 'Hello World' without using any header file. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete