I have an interesting problem.
I define,
typedef char *string;
char array[10];
string buf[10];
i=0;
while(1){
array=<assign_string>
buf[i]= array;
i++;
}
At each iteration i assign different strings. For instance, buf[0] should be "1111111111" buf[1] should be "2222222222" and so on. However when i assign "2222222222" when i=1, buf[0] also changes to "2222222222". What could be the problem?