C-Programming part
Data Type in C-Programming
In C-programming language various type of data are used to construct or creat a program on the basic of their feature it is devided into 3 categariges -1.Primary data type
2.Derived data type ( floating data type )
3.User define data type
4. Void data type
1.Primary data type :- In it we include integer and charectors .
A. Interger type data typeB. Charectors type data type
A. Integer type data type:- Integer are th whole ampth whitin a particular rang .Integer number are discribe whitin three type memory but it diffrent diffrent categaroy this memory size can be very { change } .
It is two types :- a. Signed integerb. Unsined integer
a. Signed integer
Data type Size Range
short int x 1 byte=8 bit -2^7 to +2^7 -1 there 2^7 is 2 power 7
int x 2 byte= 16 bit -2^15 to +2^15 -1
short long int x 4 byte= 32 bit -2^31 to 2^32 -1
b. unsigned integer
Data type Size Range
unsigned short int x 1 byte=8 bit 0 to 255
unsigned int x 2 byte =16 bit 0 to 65535
unsinged long int x 4 byte= 32 bit 0 to 4294967295
B. Charactofr data type :- A charactor variable is stored in 1
byte memory but similar to integer it is devided into two categary -a. signed char
b. unsigned char
size - 1 byte fo signed char its range is -128 to 127 and
for unsigned char rang is 0 to 255
example - char x= 'a'
2. Derive data type { floatint type data type } :- It is also known as floating point types and real numbers . The size of the float variable is 4 byte ( 32 bit ) and pricision (correct) is upto six digit after decimal point.
It means in a flaat variable a user can enter six digit after decimal point .for example - 91.124511
a. signed float data type
Data type Size Range
float 4 byte = 32 bit -2^31 to +2^31 -1
double 8 byte = 64 bit -2^63 to +2^63 -1
long double 10 byte = 80 bit -2^79 to +2^79-1
b. unsigned float data type
Data type Size Range
unsigned float 4 byte = 32 bit 0 to 2^31*2 -1
unsigned double 8 byte = 64 bit 0 to 2^63*2 -1
unsigned double 10 byte = 80 bit 0 to 2^79*2 -1
I. It float we can enter ( save ) sixe digits after the decimal points .
II. In long duoble variable we can save 18 digits after the decimal points.



Comments
Post a Comment