Data Type
Now i would like to share about datatype on C. C has more data types for executing variable with separate values. Every data type has unique identity and properties. For example if we need integer type numbers mean we can use "int" keyword...
Basic Data type's are 'int', 'float', 'char'. These are we most use data type. Data types also has strings arrays and some functions. Those data type are we will talk later. Now lets start with basics..
Int data type:
This data type use for integer type numbers. We cannot use for fractions number and one thing if you want to use on black screen display we need to call this data type by certain function. Every data type has separate control string. Integer data type used by "%d" control string.
Ex:
int a;
'a' is a integer type variable. we can use a for storing integer values...
printf("%d",a);
above statement show 'a' was print on output screen using "%f " control string.
Float data type:
float a;
'a' is a fractional variable. we can use a for storing fractional or decimal values...
printf("%f",a);
above statement show 'a' was print on output screen using "%f " control string.
Char data type:
char a;
'a' is a Character variable. we can use a for storing single Character.
printf("%c",a);
above statement show 'a' was print on output screen using "%c " control string.
We most use this 3 data types
Post a Comment