# C Programming — Hello World

> A basic C example that prints “Hello World” and explains header inclusion, the main function, printf, getch and the return value.

- Author: Muhammet Ali Köker
- Language: en
- Canonical: https://alikoker.com.tr/en/c-programming-hello-world
- Translation: https://alikoker.com.tr/c-hello-world
- Published: 2013-07-08T13:00:00+03:00
- Modified: 2026-08-08T13:49:35+03:00
- Verified: 2026-08-07T11:00:00+03:00
- Type: article

Prints the text “Hello World” on the screen.

```c
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Hello World");
getch();
return 0;
}
```

- The `#include` directive indicates that the specified header file will be included. In this example, `stdio.h` is the header for the standard input/output library.

- The `main` function is the first function executed when the program starts. The preceding `int` indicates that the function returns an integer.

- The `printf()` function means “print formatted” and prints formatted output to the screen.

- The `getch()` function is used here to prevent the window from closing. Its primary purpose is to read a character from the keyboard; `conio.h` must be included to use it in this example.

- The final `return 0` statement indicates that `main()` returns zero.

## References

- **[1]** Brian W. Kernighan; Dennis M. Ritchie. (1988). The C Programming Language, Second Edition. Prentice Hall.
- **[2]** International Organization for Standardization. (2011). ISO/IEC 9899:2011 - Programming Languages - C. ISO.

## Cite This Work

Köker, M. A. (2013). C Programming — Hello World. alikoker.com.tr. https://alikoker.com.tr/en/c-programming-hello-world

- BibTeX: https://alikoker.com.tr/en/c-programming-hello-world.bib
- RIS: https://alikoker.com.tr/en/c-programming-hello-world.ris
- CSL-JSON: https://alikoker.com.tr/en/c-programming-hello-world.csl.json
