Search This Blog

Pages

Wednesday, April 28, 2010 at 3:24 AM |

Our
first c program


 


             #include <iostream.h>


 


             main()


             {


Cout << “Hello everybody”:


 


             }


Now you have to
compile it


Result


This program will say “Hello everybody”


Explanation


The first line
of our program is preprocessor which help us to get our output.


 


The second line is the point from which the execution
will start and this line come only and only 1 time in the whole program.


 


Then we have braces (one
is at beginning and second is at last)
which are used to enclose our
program and we must have to type our whole program in it. (Otherwise you can’t compile you program)


 


Then we have typed “cout
<< “Hello everybody” ;”
in b/w of
braces. The
“cout” is the door from which we can send the material we want
to.


 


“<<” are the arrows showing that “Hello everybody” want to get out from the cout door.


 


In the end we typed “;” which tell the compiler that the command is ended and is
use in every end of C statement.


Note;


To run your program
use command prompt

Posted by M.Hamza Ali Labels:

0 comments: