Simple C program

Hello world in C language

//C hello world example
#include <stdio.h>
 
int main()
{
  printf("Hello world\n");
  return 0;
}
Purpose of Hello world program may be to say hello to people or the users of your software or application.
Output of program:
C hello world program output

Hello world program in c

We may store "hello world" in a character array as a string constant and then print it.
#include <stdio.h>
 
int main()
{
  char string[] = "Hello World";
 
  printf("%s\n", string);
 
  return 0;
}
Don't worry if you didn't understand above code as you may not be familiar with arrays yet.

0 Comment to "Simple C program "