Home » , , » Understanding C Program - Basic 1

Understanding C Program - Basic 1

Written By Unknown on Saturday, October 5, 2013 | 9:12 AM

This is an introductory program and from here we are going to learn A,B,C of a C Program.....

Program 1 :

#include<stdio.h>
#include<conio.h>
main()
{
Printf(“Hello Shakhawat ”);
}

OUT PUT : Hello Shakhawat


Program Analysis:

include<stdio.h> : It is a “preprosseor directive” always start from “#” and “stdio.h” is Standert Input/Output Header File.It Contains the details of “printf” file.If we use Printf(“”) in any program then we must write # include<stdio.h>

include<conio.h> : If we use clrscr() and getch() in any program then we must use #include<conio.h>.It is also a header file.

main() : We must use our every C programming fungtion into this “main()” fungtion.”()” This is called parentheses always stand after main.We don’t use semicolon after main() because main() is not an indivisual instraction or statement.Every instructions and statements works under main() fungtion.

{} : These are called brace.Left one is left brace “{“ and the right one is Right brace “}”.



printf() : To print something to our computer screen we will have to use printf().(“”) : this is called Double Quotes.It is used to print something in between (“………..”).

;  : It is called semicolon.We must use this after every instruction.Every instruction + semicolon is called statement.


Program 2 : New Line Creation

#include<stdio.h>
#include<conio.h>
main()
{
printf(“saad\nsayem\nshuvo”);
getch();
}

OUTPUT :  saad
                   sayem
                   shuvo


Program Analysis:

\n : It is a new line creator.We can use it into double quate(“………”).If we write something after \n,it will print in a new line after first line.Please follow the OUTPUT.

getch() :  getch() is related to conio.h headerfile.It will show and get the output on computer screen.
Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Learn Programming - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger| Distributed by Rocking Templates