Read my post again, you managed to delete a critical space in the scanf call.
Type: Posts; User: Salem
Read my post again, you managed to delete a critical space in the scanf call.
> scanf("%s",matrix[i]);
The problem here is you're reading a string, not a char.
Perhaps
scanf(" %c",&matrix[i][j]);