I am learning character array and wanted to do a simple program in which I create a 200x100 character array, put a string at position 0 and print it out.
This is part of a larger program I'm doing, but I need to understand how to insert a string into the array of characters to do.
I know that for the user to insert, I just put gets(x[i])
, but I need to put it in the code.
#include <stdio.h>
#include <conio.h>
int main(){
char mat[200][100];
mat[0] = "paulo";
printf("%s", mat[0]);
getch();
return 0;
}