Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
c union bytes affected
//gcc 5.4.0 #include <stdio.h> #include <stdint.h> union { uint64_t u64; uint8_t u8; } my_union; int main(void) { my_union.u64 = 0; printf("bits: 0x%08x\n", my_union.u64); my_union.u64 = ~0; printf("bits: 0x%08x\n", my_union.u64); //notice how most significant 7 bytes of union unaffected. my_union.u8 = 0; printf("bits: 0x%08x\n", my_union.u64); return 0; }
run
|
edit
|
history
|
help
1
bitwise_operation__end-of-class
purple ghost red orange blue skulls
bitmask
Add c
PRÁCTICA DE QUICKSORT
bitwise manipulation
Project 3 Part 1 v1.6
a
Project 3 Part 1 v1.3
Sunday assignment late v3