Mega Code Archive
Categories
/
C
/
Code Snippets
Define a simplest struct
#include
int main(void) { struct { int j; int k; } x, y; x.j = 10; y = x; /* assign one structure to another */ printf("%d", y.j); return 0; }