I want to modify standard phrases from a theoretical game. For example, the game has the phrase "Choose a command" and, over a given state, you would like to change all the letters "o" and "a" by an @.
For this, I thought about implementing an array of characters,
Speeches [100] [500], which can store 100 500-character phrases.
I want to assign to speech [1] "Choose an action", you say [2] "You can not go there", etc.
And to do what I want to do, since the player is in such a state, I would use sscanf in phrase [x] [] and run the whole sentence [x] [i], with i going from 0 to strlen phrase [x].
However, I can not even assign and do not know how to print these sentences.
The first problem is not knowing how to include '\ 0' at the end of a typed string within the program. At the same time,% s should work until you find the first \ 0 in the memory garbage, and you are only printing a random character in the program below:
#include<stdio.h>
int main (){
char falas [100][500];
falas[1][0] = "Seja bem vindo ao meu jogo";
printf("%s", falas[1]);
}