Skip to content

Commit ebacb40

Browse files
authored
demotion-of-integers.md: Fix example
1 parent 653f155 commit ebacb40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/c-language/demotion-of-integers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ char y = (char)0x1234;
2525

2626
assigns the value 0x34 to `y`.
2727

28-
When **`signed`** variables are converted to **`unsigned`** and vice-versa, the bit patterns remain the same. For example, casting -2 (0xFE) to an **`unsigned`** value yields 254 (also 0xFE).
28+
When **`signed`** variables are converted to **`unsigned`** and vice-versa, the bit patterns remain the same. For example, casting -2 (0xFFFFFFFE) to an **`unsigned int`** value yields 4294967294 (also 0xFFFFFFFE).
2929

3030
## See also
3131

0 commit comments

Comments
 (0)