0

please explain What are the following data types are and the storage requirements of each?
-Char
-Unsigned Char
-Int
-long
-float
-double
Would be great if someone could help me out, thanks

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Salem
0

>What are the following data types are and the storage requirements of each?
This is something you can find in any C reference. So why are you even asking the question?

char is a byte, the size is 1.
unsigned char is a byte guaranteed never to have a negative value, the size is 1.
int is a signed integer, the size depends on your compiler
long is a signed long integer, the size depends on your compiler.
float is a single precision floating-point type, the size depends on your compiler.
double is a double precision floating-point type, the size depends on your compiler.

0

I know that char is character, float is a decimal number, integer is a solid number with no decimal points, but long, double and unsigned char have me stumped?

0

Everything except float and double store integers only (of varying sizes).
The unsigned variants are restricted to positive integers (and zero) only.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.