Data types in c
Welcome to c programming
After the function in c programming we have to use curly braces. In that braces we can write statement what ever we want to do. And next , we have to mind one thing that is every statement must ends with semicolon (;).
Example------
int i;
Here it is data type and this whole thing is statement
In that printf and scanf are the input and output function, which are returning integer values only, these two are predefined functions.
And also main part to learn in c programming is data types that is as follows....
1.int
2.float
3.double
4.char
1.int:--
int is one the data type in c programming those are indication of integer values only.
In that int we have signed integer and unsigned integer. These two integer data type difference making at ranges. In unsigned we don't have negative ranges that means starts from zero. In this long int and short two types are there in the integers.
Examples------ int i;
int i=5;
2. Float: -----
These is used for the float values which are having pricision of 6 digits.
Example----
1.float t;
2.float t=5.0000;
3.float r=5.6;
3.double:---
This is another one for float values but the difference is how many digits after point or decimal values. In this precision value is 15 digits
Example------
A.double a;
B.double b=6.89999926762;
4.char::::
Char is used to represent a character and in c programming language we don't have string data type that's why we use char array as string. In this signed and unsigned char is there for address only. This is starts from -128 to +127. This is 1 byte address data type.
In this way we have data types , which are predefined data types. We have some user defined data types , those are struct......
After the function in c programming we have to use curly braces. In that braces we can write statement what ever we want to do. And next , we have to mind one thing that is every statement must ends with semicolon (;).
Example------
int i;
Here it is data type and this whole thing is statement
In that printf and scanf are the input and output function, which are returning integer values only, these two are predefined functions.
And also main part to learn in c programming is data types that is as follows....
1.int
2.float
3.double
4.char
1.int:--
int is one the data type in c programming those are indication of integer values only.
In that int we have signed integer and unsigned integer. These two integer data type difference making at ranges. In unsigned we don't have negative ranges that means starts from zero. In this long int and short two types are there in the integers.
Examples------ int i;
int i=5;
2. Float: -----
These is used for the float values which are having pricision of 6 digits.
Example----
1.float t;
2.float t=5.0000;
3.float r=5.6;
3.double:---
This is another one for float values but the difference is how many digits after point or decimal values. In this precision value is 15 digits
Example------
A.double a;
B.double b=6.89999926762;
4.char::::
Char is used to represent a character and in c programming language we don't have string data type that's why we use char array as string. In this signed and unsigned char is there for address only. This is starts from -128 to +127. This is 1 byte address data type.
In this way we have data types , which are predefined data types. We have some user defined data types , those are struct......
sir I am big fan of you
ReplyDelete