C データ型
データ型 大きさ 値の範囲
char (文字) 1バイト signed charかunsigned charと同じ
signed char 1バイト -128〜127
short int [%hd] 2バイト -32,768〜32,767
unsigned short int 2バイト 0〜65,535
int (整数) [%d] 4バイト -2,147,483,648〜2,147,483,647
unsigned int [%u] 4バイト 0〜4,294,967,295
long int [%ld] 4バイト -2,147,483,648〜2,147,483,647
unsigned long int [%lu] 4バイト 0〜4,294,967,295
float (浮動小数点) [%f] 4バイト 6桁分の精度
double (倍精度浮動小数点数) 8バイト 10桁分の精度
unsigned long long [%llu] 8バイト
long long [%lld] 8バイト
long double [%Lf] 10バイト 10桁分の精度
void (値なし)
typedef unsigned char BYTE; // UChar->4bit
typedef unsigned short WORD; // UShort->8bit
typedef unsigned long DWORD; // ULong->16bit
typedef unsigned int UINT;
typedef int BOOL;
typedef char CHAR;
typedef WCHAR TCHAR;
typedef unsigned short WCHAR;
typedef WCHAR FAR * LPWSTR;
typedef const WCHAR FAR * LPCWSTR;
typedef CHAR FAR * LPSTR;
typedef const CHAR FAR * LPCSTR;
typedef TCHAR FAR * LPTSTR;
typedef const TCHAR FAR * LPCTSTR;
typedef DWORD LCID;
typedef const void FAR * LPCVOID;
C
TOP
このホームページに関するお問合せは
ホームページ:さがしもの
Eメール:ma_kagawa@hotmail.com
香川まこと