Data Mapping

Each data format supported by IBM C and C++ Compilers is mapped into storage with a specific alignment.

Alignment refers to the positioning of variables on byte boundaries. Alignment within a structure can be changed via #pragma pack or via the /Sp compiler option.

For automatic variables, consider the following information:



Mapping of Fundamental Data Types
Mapping of Compound Data Types
Format of Single-Byte Character Data
Format of Double-Byte Character Data
Format of Two-Byte Integer Data
Format of Four-Byte Integer Data
Format of Eight-Byte Integer Data
Format of Ten-Byte Floating Point Data in Sixteen-Byte Fields
Format of Null-Terminated Character Strings
Format of Fixed-Length Arrays of Fundamental Data Types
Format of Aligned Structures
Format of Unaligned or Packed Structures
Format of Arrays of Structures
Format of Structures Containing Bit Fields (OS/2)
Format of Structures Containing Bit Fields (Windows)