Print Hello world! in C programing

For "C-programming"
How to print "Hello world!"

type the following in the file "hello.c"

#include<stdio.h>
main( )
{
 printf("Hello world\n");
}

then do the following in the terminal:

(1)  cd /path/to/hello.c

(2) gcc hello.c
 this will create an executable file "a.out"

(3) Then run the executable file with:
    ./a.out

Comments

Popular posts from this blog

How to Embed mp4 movie in beamer latex presentation

How to install ifort compiler in you personal directory on University cluster/workstation

How Install XGRAFIX in Ubuntu-12.04