There is no reason that should happen. It would more better if you could post us with some more code.
My sample code donst do anything like that
Code:
#include <stdio.h>
struct node
{
int data1;
int data2;
};
int main()
{
struct node temp1, temp2;
temp1.data1 = 10;
temp1.data2 = 20;
printf("Temp1\n");
printf("%d\n",temp1.data1);
printf("%d\n",temp1.data2);
temp2 = temp1;
temp1.data1 = 30;
temp1.data2 = 40;
printf("Temp1\n");
printf("%d\n",temp1.data1);
printf("%d\n",temp1.data2);
printf("Temp2\n");
printf("%d\n",temp2.data1);
printf("%d\n",temp2.data2);
temp2.data1 = 50;
temp2.data2 = 60;
printf("Temp1\n");
printf("%d\n",temp1.data1);
printf("%d\n",temp1.data2);
printf("Temp2\n");
printf("%d\n",temp2.data1);
printf("%d\n",temp2.data2);
getchar();
return 0;
}
/*my output
Temp1
10
20
Temp1
30
40
Temp2
10
20
Temp1
30
40
Temp2
50
60
*/
ssharish2005