Online Free C / C++ Course

Learning C / C++ online

Now lets see how we will write program first we should know about structure of C program it will be like below





Here we write C code





you will these lines in each program main() indicate that we will use main function of c program to write our code. we can use other functions also but in start we will use main only. and we will write our code in that two (  )


Each statement of c will end with ; like . in English language to indicate end of statement.


There is one other thing want to mention which is called comments


often we need to write comments in our program just to explain other reader  what this line is all about. it has nothing to do with C compiler but it is useful for those who read your code or may be for your self later.


Lets see how we write comments here is example


/* this is comment line */


You see we have wrote comments inside /* */


So this will be the way to write comments all the time. you will get use to this later but for now


lets click next to start our first program in C!



Tanvir Shah
S. Tavnir Hussain


Tauqeer Hussain
Tauqeer Hussain

Faculty Incharge

Safi Ullah
Safi Ullah Khurum