c - Print matrix closing codeblocks -


what's wrong in code below? codeblocks closes when try run it, why? need create matrix 700 rows , 50 column , fill words. possible using static matrix or dinamic one? won't cause stack overflow because of it's size?

#include <stdlib.h> #include <stdio.h> #include <string.h> int main(){ int i,j; char mat_palavras[100][100];       for(i=0; i<100; i++){         for(j=0; j<100; j++){           mat_palavras[i][j]= 'i';         }     }     for(i=0; i<100; i++){         for(j=0; j<100; j++){           printf("%s\n" ,mat_palavras[i][j]);         }     } } 

this line causes problem

printf("%s\n" ,mat_palavras[i][j]); 

instead of %s, use %c.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -