We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fec0b85 + 6833fee commit 73688e9Copy full SHA for 73688e9
docs/c-language/c-bit-fields.md
@@ -48,23 +48,24 @@ Bit fields defined as **`int`** are treated as **`signed`**. A Microsoft extensi
48
49
Bit fields are allocated within an integer from least-significant to most-significant bit. In the following code
50
51
-```
+```C
52
struct mybitfields
53
{
54
unsigned short a : 4;
55
unsigned short b : 5;
56
unsigned short c : 7;
57
} test;
58
59
-int main( void );
+int main( void )
60
61
test.a = 2;
62
test.b = 31;
63
test.c = 0;
64
+ return 0;
65
}
66
```
67
-the bits would be arranged as follows:
68
+the bits of `test` would be arranged as follows:
69
70
71
00000001 11110010
0 commit comments