Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Data Type Specifiers and Equivalents

This book generally uses the forms of the type specifiers listed in the following table rather than the long forms, and it assumes that the char type is signed by default. Therefore, throughout this book, char is equivalent to signed char.

Type Specifiers and Equivalents
Type Specifier Equivalent(s)

signed char1

char

signed int

signed, int

signed short int

short, signed short

signed long int

long, signed long

unsigned char

unsigned int

unsigned

unsigned short int

unsigned short

unsigned long int

unsigned long

float

long double2

1   When you make the char type unsigned by default (by specifying the /J compiler option), you cannot abbreviate signed char as char.

2   In 32-bit operating systems, the Microsoft C compiler maps long double to type double.

Microsoft Specific

You can specify the /J compiler option to change the default char type from signed to unsigned. When this option is in effect, char means the same as unsigned char, and you must use the signed keyword to declare a signed character value. If a char value is explicitly declared signed, the /J option does not affect it, and the value is sign-extended when widened to an int type. The char type is zero-extended when widened to int type.

END Microsoft Specific

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.