I found quiet tricky in copying string from two dimensional array to one dimensional array. So I made access those value by address. It is working fine inside for loop. Is the one-dimensional array is really copied with two-dimensional array value.
char *str[4] = {"i " "California", "ii " "Texas", "iii " "Florida", "iv " "Washington"}; //two dimensional array
int r = 0, c, i = 0;
char *temp; //one dimesional array
for(r = 0; r < 4; r++){
c = 0;
while(*(str[r]+c) != '\0'){
printf("%c", *(str[r]+c));
c++;
temp = &str[r][c];
printf("%c", *temp);
}
printf("\n");
}
return 0;