In Leah's trivia game, what type of variable is used to store the questions?

Prepare for the ICT Gaming Essentials Exam. Use flashcards and multiple choice questions, each with hints and explanations. Ace your exam!

Multiple Choice

In Leah's trivia game, what type of variable is used to store the questions?

Explanation:
Storing the questions is about text, so a string variable is used. A string holds a sequence of characters—letters, spaces, punctuation—exactly what a question is when it’s shown to players. An integer is for numbers, a boolean for true/false, and an array is a collection type you’d use if you were keeping many questions together (often as an array of strings). But for each individual question, the appropriate type is a string.

Storing the questions is about text, so a string variable is used. A string holds a sequence of characters—letters, spaces, punctuation—exactly what a question is when it’s shown to players. An integer is for numbers, a boolean for true/false, and an array is a collection type you’d use if you were keeping many questions together (often as an array of strings). But for each individual question, the appropriate type is a string.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy