Data Type in C




Define:-

Data type is defining attributes to the variable in C. The main part of C language is Data Type, which is used to  allocate memory for variable. Data types are has different types of formats such as int, char, float sting, double and etc. 

1. Integer Data type :-

Integer data type represented by "int" => 2 bytes (1 byte = 8 bit).

It can store the value of  Whole Number. It can store up to 16 bit block of data. If 16 bits filled then its showing error message only. If you want store more than 16 bit blocks then you can choose other integer data type as "long int". Other formats of integers are following by int, short int, long int, unsigned int 

2. Float Data Type:-

Floating data type represented by float => 4 bytes. 

Floating Data type is used to calculate fraction decimal Calculation as same as storing information on it. Floating variables are call by %f. They extended formats of float is Double which has 8 byte of data for storage. 

3. Character Data Type:-

Character Data type represented by char. Characters are single letter which are used at check box for Y/N question or condition.

char => 1 byte 

Data types and Control Strings:- 

Data Types and Control String, Data types in C
Control strings are address of Data types. Every data types has separate control string. Control strings are used to get variables value. Every control strings get/put their related values and then give it to the specify variables.

Escape Sequence Function:-

Escape Sequence in Data Type, Data type in C

C has another one good escape sequence functions. Those are used to format the output on print screen. You can add basic formats such as more than 2 space, New line, Back Space , Alert and etc. All escape sequence are execute only at output screen. Its written in printf or scanf statements. We can put escape sequence after placing our control string of data type .




Still U have doubt then you can see below video. If you like this post then share post or leave comment your suggestion

 

Post a Comment

Blogger