Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Padding Err
#include <stdio.h> #include <stdint.h> #include <assert.h> #include <stddef.h> typedef struct { float re; float im; } IQ; typedef struct { uint8_t a; int8_t a_pad[3]; IQ b; } S1; typedef struct { uint8_t a; IQ b; } S2; int main(void) { assert(offsetof(S1, a) == offsetof(S2, a)); assert(offsetof(S1, b) == offsetof(S2, b)); // this should fail, but doesn't! return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
C_141127_MatricesSUMA
PUNTEROS 1
bitwise operations
Star 1,3
hwk2
Student. Txt
Mem alloc test
AC_setting_example
141128_EjemploChorraArray
C_141203_PALINDROMO
Please log in to post a comment.