Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
ytre
Project 3 Part 1 v1.4
test
Exploiting uninitialized variable
String manipulation
qsort para struct
Project 4 v.6
C_141113_VariosPerfectos
Atoi without minus
B_141121_fibonacci