I have a string vector ( palavras[x][y]
) , I can read every word that will be an element of the vector, but I can not print any of these stored words.
printf("%s",palavras[a][b]),
does not work.
Here are my attempts:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char nomes[1][15];
int i;
scanf("%s",&nomes[0][15]);
scanf("%s",&nomes[1][15]);
printf("%s",&nomes[0][15]);
// for(i=0;i<=15;i++){
// printf("%c",nomes[0][i]);
// }
system("PAUSE");
return 0;
}
The% commented commented also did not work. How can I proceed?