Browse Source

refactoring: Const hinzugefügt

remotes/origin/Pascal
Pascal Schneider 11 months ago
parent
commit
b2f7624f5e
  1. 4
      src/timequiz.c

4
src/timequiz.c

@ -23,7 +23,7 @@ void timequiz() {
printf("Welcome to our Time Quiz!\n"); printf("Welcome to our Time Quiz!\n");
printf("You have 60 seconds to answer the questions. Have fun!\n"); printf("You have 60 seconds to answer the questions. Have fun!\n");
char* questions[] = {
const char* questions[] = {
"What is the capital of France?", "What is the capital of France?",
"Who developed the theory of relativity?", "Who developed the theory of relativity?",
"Who was the first President of the United States?", "Who was the first President of the United States?",
@ -65,7 +65,7 @@ void timequiz() {
"What is the capital of Australia?" "What is the capital of Australia?"
}; };
char* answers[][NUM_ANSWERS] = {
const char* answers[][NUM_ANSWERS] = {
{"Paris", "London", "Berlin", "Madrid"}, {"Paris", "London", "Berlin", "Madrid"},
{"Albert Einstein", "Isaac Newton", "Galileo Galilei", "Stephen Hawking"}, {"Albert Einstein", "Isaac Newton", "Galileo Galilei", "Stephen Hawking"},
{"George Washington", "Thomas Jefferson", "John Adams", "James Madison"}, {"George Washington", "Thomas Jefferson", "John Adams", "James Madison"},

Loading…
Cancel
Save