You can create an infinite loop using either while or for.
In the example below, the body of the for loop will run forever.
1
2
3
4
5
6
| // Run foreverfor (;;){ AskUserATriviaQuestion(); TellThemTheCorrectAnswer();} |
You can accomplish the same thing using while (true), but you might still use the for loop if you want to use a loop variable.
1
2
3
4
5
6
| // Run foreverfor (uint questionNumber = 1; ; questionNumber++){ AskUserATriviaQuestion(questionNumber); TellThemTheCorrectAnswer(questionNumber);} |

