WGU D684 INTRODUCTION TO COMPUTER SCIENCE EXAM QUESTIONS AND CORRECT ANSWERS LATEST UPDATE
WGU D684 INTRODUCTION TO COMPUTER SCIENCE EXAM QUESTIONS AND CORRECT ANSWERS LATEST UPDATE Which value is stored as an integer in computer programming? - Answer- 21. Rationale: The integer data type is used to represent positive or negative whole numbers without fractional parts. Which coding construct repeats a task while a condition is true? - Answer- Iteration. Rationale: The iteration construct, or the looping construct, uses a while statement to perform the same task over and over again as long as the condition is true. How are items accessed in a stack? - Answer- The last item to be added becomes the first item removed (LIFO). Rationale: A stack is an ordered group of items that can only be accessed at one end, called the top of the stack. Items can be pushed onto and popped off of this end. Therefore, the last item to be added becomes the first item removed. A web browser puts websites into a viewing history log and accesses the most recent one when the back button is clicked. Which data structure would be appropriate for this situation? - Answer- Stack. Rationale: A stack is an ordered group of items that can only be accessed at one end, called the top of the stack. Items can be pushed onto and popped off of this end. In this case, the only item needing to be accessed is the most recently added item. Therefore, a stack is most appropriate for storing the data.
Written for
- Institution
- WGU D684 Introduction To Computer Science
- Course
- WGU D684 Introduction To Computer Science
Document information
- Uploaded on
- December 13, 2025
- Number of pages
- 74
- Written in
- 2025/2026
- Type
- Exam (elaborations)
- Contains
- Questions & answers