Here We Will Learn To Program C. I'll try To give my Best To Make you understand.
"Let's Begin"
A Program To Do Comparision Of Two Numbers |
Lets Understand It.
- #include<stdio.h>
#include<conio.h>
void main()
{}
This is the Starting of Nearly Every Programme.
In this # is Preprocessor Directives used to Include a header File.
stdio.h stands for Standard Input Output Header File and conio.h stands for Console Input Output Header File.
stdio.h includes function like printf(),scanf(),etc.
conio.h includes function like clrscr(),getch(),etc.
void main() means starting pf main programme.
"{}" program must be written in Between of curly brackets. - clrscr() stands for Clear screen,used to clear screen.If we don't write it then we can see the old Output.
- int a,b; here int stant for Integer And Allow only Numerical data to be Entered in a b and c.
a and c represent Variables.Variable is a address or storage where the Data is Stored. - if(a>b)
{
printf("%d is Greater Number",a);
}
IF is conditional Statement means used to give condition. A conditional statement has only Two answer TRUE and FALSE. If is a TRUE conditional statement.
Curly Brackets '{}' works like a Gate .If the condition(a>b) is true then the Data will Print or run inside the Bracket.If the Condition is FALSE then the next condition will be checked. - else if(b>a)
{
print("%d is Greater Number",b);
}
ELSE IF is also a TRUE Conditional Statement.WE Can ADD as my condition We Have using else if(). - else
{
printf("BOTH are Equal")
}
ELSE is a FALSE Conditional Statement.It prints or run False Data . - getch() stands for get character. It is important to see output or it is used to stop screen on output screen
a=12 & b=23 |
Download Link Of Above Programme:-
How to Use it.
Download File >Go To Turboc3(or turboc folder)>bin>Paste File>
open Turbo c Application>File>open(or F3)>Select File
NOTE:- Above File Can Be Opened With Other Compilers(Like code blocks, visual studio, etc.), Some Changes Might Require.
THANKS
No comments:
Post a Comment