C examples for Structure:Structure Definition
One structure can be assigned to another structure of the same type using a single assignment statement.
#include <stdio.h> int main(void) { struct {// w ww. ja v a 2s .c o m int a; int b; } x, y; x.a = 10; y = x; /* assign one structure to another */ printf("%d", y.a); return 0; }