Hello world C

How to write a hello world in C language? To learn a programming language, you must start writing programs in it, and this could be your first C program. Let's have a look at the program first.

#include <stdio.h>
#include <conio.h>
void main()
{
  printf("Hello world\n");
  getch();
}
Library function printf is used to display text on the screen, '\n' places the cursor at the beginning of the next line, "stdio.h" header file contains the declaration of the function.

No comments:

Post a Comment