Structure And basic program of C Language Tutorial-4


We have already discussed about C program,compiler,and some basic tools .

Today we will discuss about structure of C programming. 
 lets go to the basic code.
 First open Codeblocks then you can select manually file then new file and go to empty file. you can also press in keyboard Crlt+Shift+N at a time. then the new empty file will be open. 

then you need save that file. for this step press Crlt+S or manually go to file then click save as then you must need to give .C extension
example:
then write Your basic code:

#include<stdio.h>
int main()
{

    //this program is for printing something

    printf("Hello Programmer!");
    return 0;

}

Then click build and run icon. the program will run 


the output will shown like this:



Now Structure:

1. #include<stdio.h> represent prepeocessor Commands. and here stdio means standard input output .
2. int main () thats represent the main function where the program execution begin .
3. {} where you will write the program . and it will be under main function.
4. // represent the comment line which can not display on output on the program. 
5. printf() which represent some thing print . printf("") it will print which will remain between double coutation . here have "Hello programmer" so it will be print.
6. return 0 terminates the main function and returns the value zero. that will finish the program .

thank you all. see you next post. best of luck
Structure And basic program of C Language Tutorial-4  Structure And basic program of C Language Tutorial-4 Reviewed by Saroar Zahan Sojib on February 27, 2019 Rating: 5

No comments:

ads
Powered by Blogger.