I have an array of pointers to chars where I store string from the console. How can I check, if a new string is entered to inkrement the index? I thought about something like that but I always get Segmentation Fault.
char** arr;
int i = 0;
int j = 0;
arr = malloc(sizeof(char*) * 10);
while (arr[i][j] != '\n') {
scanf("%c", &arr[i][j]);
j++;
}
i++;
// Read next string here