Uploaded February 2025 | Updated November 2026, 1 day ago
In this beginners C Programming Language tutorial we dive into the fundamentals by writing our very first program. This is part of our C programming video series, where we aim to break down key concepts in an easy-to-understand manner. If you haven't already, we recommend watching the earlier videos in the series, where we cover important topics such as what C programming is, what a compiler does, and how to set up a C compiler on your system. You should also have a text editor installed—whether it's VS Code, Code::Blocks, or any other editor you prefer.
In this lesson, we focus on writing a simple program that displays the text "Hello World" on the screen. This is commonly known as the "Hello World" program and is often the first program written by beginners in any programming language. The process is quite simple: we write instructions in C, save the file with a ".c" extension, compile it into machine code, and then execute that code.
To get started, I will use Visual Studio Code, with a folder setup that includes a workspace and a "Programs" folder. I will create a new subfolder named "Hello World," where I will save our program file. The file is named "hello_world.c" because it is a meaningful name that reflects the purpose of the program. The file extension ".c" is essential since it identifies the file as a C source code file.
Once the file is set up, we discuss some important aspects of writing code in C. For instance, many C programs need to perform common tasks such as taking user input or displaying text on the screen. To make this easier, C provides built-in features available through the C Standard Library, which is a collection of predefined functions that help handle these tasks. For example, if we wanted to convert text from lowercase to uppercase, we could either write the conversion logic ourselves or simply use an existing function from the C Standard Library.
When you install the C programming language on your computer, you automatically get access to the C Standard Library. But how do you use it in your program? The answer is through functions. A function is a group of instructions given a specific name that performs a task. For example, there are functions for calculating averages, displaying text, and more. These functions can be used by simply calling them by name in your program.
In our "Hello World" program, we use the `printf` function from the C Standard Library to display text on the screen. To use this function, we first need to include the necessary header file. The header file we need is called `stdio.h`, which stands for "Standard Input/Output." This file contains the `printf` function and other related features. To include this file, we use the `#include` directive in our code.
After setting up the inclusion of the `stdio.h` header file, we proceed to define the entry point of the program, which is a function called 'main'. The `main` function is the first function that the operating system calls when the program runs. Inside the `main` function, we write the instructions that we want to be executed. In this case, the instructions are to display the text "Hello World" using `printf`.
The program starts with `int main()`, where `int` indicates that the `main` function returns an integer value (in this case, 0). Inside the curly braces `{}` following `main()`, we use `printf` to output the text. After that, we use `return 0;` to signify that the program has finished without errors. The number 0 is a convention used to indicate that the program ran successfully.
Once we have written the program, the next step is to compile and run it. This is where the text editor or Integrated Development Environment (IDE) comes into play. In our case, using Visual Studio Code, we can simply click the "Run C++ File" button, and it will automatically compile the code into machine code and execute it. We will see the output "Hello World" in the terminal.
After running the program, feel free to experiment with changing the text inside the `printf` function. For instance, you can replace "Hello World" with your name or any other text, but remember to enclose the text in double quotes. This is because text enclosed in double quotes is recognized as a string in C, which can contain both letters and numbers.
By the end of this video, you should have a solid understanding of how to write your first C program, including using functions, including header files, and compiling and running the code. We encourage you to experiment with the code and ask any questions in the comments section. If you happen to have answers to others' questions, feel free to reply. We hope this video helped you take your first step toward mastering C programming!
our Website
LearningLad.com
Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial
In this beginners C Programming Language tutorial we dive into the fundamentals by writing our very first program. This is part of our C programming video series, where we aim to break down key concepts in an easy-to-understand manner. If you haven't already, we recommend watching the earlier videos in the series, where we cover important topics such as what C programming is, what a compiler does, and how to set up a C compiler on your system. You should also have a text editor installed—whether it's VS Code, Code::Blocks, or any other editor you prefer.
In this lesson, we focus on writing a simple program that displays the text "Hello World" on the screen. This is commonly known as the "Hello World" program and is often the first program written by beginners in any programming language. The process is quite simple: we write instructions in C, save the file with a ".c" extension, compile it into machine code, and then execute that code.
To get started, I will use Visual Studio Code, with a folder setup that includes a workspace and a "Programs" folder. I will create a new subfolder named "Hello World," where I will save our program file. The file is named "hello_world.c" because it is a meaningful name that reflects the purpose of the program. The file extension ".c" is essential since it identifies the file as a C source code file.
Once the file is set up, we discuss some important aspects of writing code in C. For instance, many C programs need to perform common tasks such as taking user input or displaying text on the screen. To make this easier, C provides built-in features available through the C Standard Library, which is a collection of predefined functions that help handle these tasks. For example, if we wanted to convert text from lowercase to uppercase, we could either write the conversion logic ourselves or simply use an existing function from the C Standard Library.
When you install the C programming language on your computer, you automatically get access to the C Standard Library. But how do you use it in your program? The answer is through functions. A function is a group of instructions given a specific name that performs a task. For example, there are functions for calculating averages, displaying text, and more. These functions can be used by simply calling them by name in your program.
In our "Hello World" program, we use the `printf` function from the C Standard Library to display text on the screen. To use this function, we first need to include the necessary header file. The header file we need is called `stdio.h`, which stands for "Standard Input/Output." This file contains the `printf` function and other related features. To include this file, we use the `#include` directive in our code.
After setting up the inclusion of the `stdio.h` header file, we proceed to define the entry point of the program, which is a function called 'main'. The `main` function is the first function that the operating system calls when the program runs. Inside the `main` function, we write the instructions that we want to be executed. In this case, the instructions are to display the text "Hello World" using `printf`.
The program starts with `int main()`, where `int` indicates that the `main` function returns an integer value (in this case, 0). Inside the curly braces `{}` following `main()`, we use `printf` to output the text. After that, we use `return 0;` to signify that the program has finished without errors. The number 0 is a convention used to indicate that the program ran successfully.
Once we have written the program, the next step is to compile and run it. This is where the text editor or Integrated Development Environment (IDE) comes into play. In our case, using Visual Studio Code, we can simply click the "Run C++ File" button, and it will automatically compile the code into machine code and execute it. We will see the output "Hello World" in the terminal.
After running the program, feel free to experiment with changing the text inside the `printf` function. For instance, you can replace "Hello World" with your name or any other text, but remember to enclose the text in double quotes. This is because text enclosed in double quotes is recognized as a string in C, which can contain both letters and numbers.
By the end of this video, you should have a solid understanding of how to write your first C program, including using functions, including header files, and compiling and running the code. We encourage you to experiment with the code and ask any questions in the comments section. If you happen to have answers to others' questions, feel free to reply. We hope this video helped you take your first step toward mastering C programming!
our Website
LearningLad.com
Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial










