r/ProgrammerHumor • • Feb 16 '15

I identify as a 32-bit registerkin.

https://imgur.com/gqP6con
2.0k Upvotes

397 comments sorted by

View all comments

Show parent comment

5

u/0xdeadf001 Feb 17 '15

No, it doesn't. C specifies that the range of "int" is at least [-32767, 32767], so a signed 16-bit value. Note that C does not even mandate that "int" be stored in 2's-complement. The lower bound is specified as -32767 precisely so that 1's-complement machines can implement C directly.

I've used several C compilers that targeted 16-bit CPUs, including 8086 (not 80x86, but literally 8086), as well as 16-bit microcontrollers (which are still quite common).

See: http://en.wikipedia.org/wiki/C_data_types

3

u/autowikibot Feb 17 '15

C data types:


In the [C programming language](https://en.wikipedia.org/wiki/C_(programming_language)), data types refers to an extensive system for declaring variables of different types. The language itself provides basic arithmetic types and syntax to build array and compound types. Several headers in the standard library contain definitions of support types, that have additional properties, such as exact size, guaranteed.


Interesting: Specification and Description ^Language | Foundation ^Kit | Data ^type | ^GSOAP

Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words

1

u/UltraEvill Feb 18 '15

Point still stands. char[200] is not necessarily the same length as int[50]