Basics of C.
C language consists of datatypes, variables and constants.
Datatypes are those which hold some values during the execution of program.
For eg. int . int is the datatype which can hold integer values.
Float . it is the datatype which hold the fractional value.
Char is the datatype which can hold the characters.
.
And the most important thing is C is a case sensitive language.
int and Int both have different meanings.
some examples of datatype are .
here is a little illustration of such datatype in C program.
#include<stdio.h>
void main()
{ int a=1;
float b=0.0f;
char c='a';
printf("%d%f%c", a,b,c);
}
At the top these are header files which contain function printf which is being used in this program.
The out of the program will be 10.0a.
Comments
Post a Comment