Sarah wants to create a menu-driven program where the menu is displayed repeatedly until the user selects the "Exit" option. What control structure can assist her in achieving this?
- Do-While Loop
- For Loop
- If-Else Statements
- Switch Statement
To create a menu-driven program like Sarah's, the "Do-While Loop" is the most appropriate. It ensures that the menu is displayed at least once and then repeatedly as long as the user doesn't choose the "Exit" option, providing the desired functionality.
Loading...
Related Quiz
- The keyword _______ is used to access the base class’s members in the derived class.
- Which of the following algorithms is not present in the C++ STL?
- The minimum possible value of a variable of type short int is _______.
- How does operator precedence affect the evaluation of complex expressions in C++?
- When dealing with binary files, the ios::binary mode should be used in conjunction with another mode such as _______.