The information contained in one structure can be assigned to another structure of the same type using a single assignment statement. You do not need to assign the value of each member separately.
\* C Program to illustrates structure assignments. *\
# include < stdio.h >
struct add
{
int a ;
int b ;
} x, y ;
int main( )
{
x.a = 10 ;
y = x ;
printf(" %d ", y.a) ;
return ( 0 ) ;
}
10
After the assignment, y.a will contain the value 10.