I am trying to set up a 10x10 grid filled with '$' characters and then print it.
char **plot;
plot = (char**)calloc(100, sizeof(char));
int i,j;
for (i=0; i< 10; i++) {
for(j=0; j<10; j++){
plot[i][j] = '$';
}
}
for (i=0; i<10; i++) {
for(j=0; j<10; j++) {
printf("%c", plot[i][j]);
}
}
free(plot);
This is my code so far, when I run this I get a segmentation fault.