Browse Source

refactoring: NUM_ANSWERS Define

remotes/origin/Pascal
Pascal Schneider 11 months ago
parent
commit
ef89815d99
  1. 6
      src/timequiz.c

6
src/timequiz.c

@ -4,6 +4,10 @@
#include <string.h>
#include "timequiz.h"
#define NUM_ANSWERS 4
void timequiz();
int getRandomQuestionIndex(int askedQuestions[], int totalQuestions);
@ -61,7 +65,7 @@ void timequiz() {
"What is the capital of Australia?"
};
char* answers[][4] = {
char* answers[][NUM_ANSWERS] = {
{"Paris", "London", "Berlin", "Madrid"},
{"Albert Einstein", "Isaac Newton", "Galileo Galilei", "Stephen Hawking"},
{"George Washington", "Thomas Jefferson", "John Adams", "James Madison"},

|||||||
100:0
Loading…
Cancel
Save