First program of C language (Hello World)

C is a powerful and widely used programming language that can run on various platforms. It is also the basis of many other languages such as C++, Java, and Python. In this blog, I will show you how to write a simple C program that prints “Hello, world!” on the screen, and explain the basic concepts and syntax of C. This blog is suitable for beginners who want to learn C programming from scratch, as well as for experienced programmers who want to refresh their skills. By the end of this blog, you will be able to write your own C programs and understand how they work. If you are interested in learning C programming, please read on and follow the steps. I hope you enjoy this blog and find it useful. 😊



code : 

 

#include<stdio.h>

int main() {

printf("hello world\n");

return 0;

}


This is a simple C program that prints the string “hello world” followed by a newline character to the standard output. Here is an explanation of each line of the code:

  1. #include<stdio.h>: This line includes the stdio.h header file, which contains the declarations for the printf function used in the program.
  2. int main() {: This line defines the main function, which is the entry point of the program.
  3. printf("hello world\n"); : This line calls the printf function to print the string “hello world” followed by a newline character (\n) to the standard output.
  4. return 0; : This line returns 0 from the main function, indicating that the program has executed successfully.
  5. }: This line marks the end of the main function.

 


My YouTube Channel ::

Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice.
We will meet soon. bye. Jay Hind...

Comments

Popular posts from this blog

Exploring Pascal's Triangle in C: A Code Breakdown