You are developing an interactive application that continuously accepts user input until the user decides to exit. Which loop construct would be most appropriate for this scenario?
- do-while loop
- for loop
- switch statement
- while loop
The most appropriate loop construct for an interactive application that accepts user input until the user decides to exit is a 'while loop.' It allows continuous input acceptance while checking an exit condition.
Loading...
Related Quiz
- A ________ allows multiple variables to share the same memory location.
- The fread function in C is used to read data from a file and stores the data in the ________.
- How do you declare a two-dimensional array of integers with 3 rows and 4 columns?
- Which function in C is used to flush the output buffer of a stream?
- The size of a structure in memory is determined by the ________ of its members.