Skip to content

Commit 80d3b1a

Browse files
authored
Merge pull request #5223 from Alcaro/patch-1
demotion-of-integers.md: Fix example
2 parents 653f155 + ebacb40 commit 80d3b1a

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)