Home > Backend Development > C++ > 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
Release: 2023-08-26 09:37:02
forward
929 people have browsed it

在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;
}
Copy after login

Output

Hello World
Copy after login
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, ...);
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template