Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


developerWorks: Everything You Ever Wanted to Know About C Types, Part 1

Jan 05, 2006, 08:30 (0 Talkback[s])
(Other stories by Peter Seebach)

"The C type system has been adapted to a great number of architectures. As C was adapted to new systems, decisions had to be made. Should the int type be the same size on every new system, or should it be the most convenient size on every system, even if this meant it wasn't always the same size?

"If you learn nothing else from these articles, learn this: On any C language implementation compliant with any C standard ever written, sizeof(char) is exactly one, whether char is eight bits, 16, 60, or 64. If you use the GNU autoconf test for sizeof(char), you might as well tattoo 'I don't know what sizeof means' on your forehead..."

Complete Story

Related Stories: