First Program in C Language with Free Notes

Introduction – First C Program

Here we are going to write a C Language Program and also the explanation of the program. Which things we add in program and how it works everything we will explain in briefly.

#include <stdio.h>
      int main () {
               printf("Hello, World!\n");
           return 0;
          }
C Language Hand-Written Notes

Explanation about Example:

  • #include <stdio.h> – This lines includes the standard input-output library “<stdio.h>” in the Program. It provides function like “printf” for input and output operations.
  • int main () {…} – This is the main function, the entry point of the program. Every C Program must have a main function. It returns an integer “int” value to the operating system, indicating the program’s exit status.
  • printf(“Hello, World!\n”); – This line uses the “printf” function to print the text “Hello, World!” to be the console. The “\n” is an escape sequences representing a newline character, which moves the cursor to the next line after printing.
  • return 0; – The return statement ends the main function and returns the value 0 to the operating system. A return value of 0 conventionally indicates a successful execution of program.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top