Friday 22 May 2015

  • Friday, May 22, 2015
C hello world program :- c programming language code to print hello world. This program prints hello world, printf function is used to display text on screen, '\n' places cursor on the beginning of next line, stdio.h header file contains declaration of printf function. The code will work on all operating systems may be it's Linux, Mac or any other and compilers. To learn a programming language you must start writing programs in it and may be your first c code while learning programming.

C hello world example

#include 

int main()
{
printf("Hello world\n");
return 0;
}

Hello world program in c

We may store "hello world" in a character array and then print it.
#include 

int main()
{
char string[] = "Hello World";

printf("%s\n", string);

return 0;
}

Hello world program.

Output of program:

Hello World 

Related Posts Plugin for WordPress, Blogger...

Vacancy

RBI has announced the recruitment for 134 GRADE B OFFICERS.
 The examination will be in two phases.
 The detailed advertisement will be published on 5th October.

Popular Posts