#include #include int main() { int in,i,j; char *arr[100],str[14]; scanf(\"%d\",&in); i=0; while(i
You are storing every string in the same place, overwriting the previous string each time. Don't do that. str is a buffer, and all of the pointers in the array arr are pointing at it.
str
arr