---
title: 1.1 C Hello World
description: "A C program starts execution from the `main()` function. This basic program demonstrates the standard structure of a C program, including a header file, the `main()` function, a statement, and the return statement. ``` #include int main() { printf(\"Hello, World!n\");…"
url: "https://edcret.in/docs/c-programming/basic-refreshers/1-1-c-hello-world/"
updated: "2026-09-06"
category: C Programming / Basic Refreshers
---

# 1.1 C Hello World

A C program starts execution from the `main()` function. This basic program demonstrates the standard structure of a C program, including a header file, the `main()` function, a statement, and the return statement.

```
#include <stdio.h>

int main()
{
    printf("Hello, World!n");

    return 0;
}
```

### Example Output

```
Hello, World!
```

### Explanation

The header file:

```
#include <stdio.h>
```

provides the declaration of `printf()`, which is used to write formatted output to the standard output stream.

The program entry point is:

```
int main()
```

`main()` returns an `int` value to the environment that started the program.

The output statement is:

```
printf("Hello, World!n");
```

`printf()` writes the specified text to standard output. The escape sequence `n` moves the output position to the next line.

The statement:

```
return 0;
```

terminates `main()` and returns `0`, conventionally indicating successful program termination.

The braces `{` and `}` define the body of the `main()` function, while the semicolon `;` terminates each statement.
