Study online at https://quizlet.com/_gyclbs
1. What is a linked list? A collection of elements,
each containing a refer-
ence to the next element.
2. Which description best describes a stack? Last-in, first-out (LIFO)
structure
3. What is the primary characteristic of a queue? There is FIFO access.
4. What is a subprogram? A sequence of program
instructions that perform a
specific task
5. In pseudocode, how would you call a function named CalculateSum(a, b)
CalculateSum with two parameters a and b?
6. What is the primary purpose of using subprograms in To allow for code reuse
a program? and better organization
7. Which operation is used to add an element to the top Push
of a stack?
8. Which scenario is a stack most suitable for? Managing tasks in a print-
er queue
9. Which is an example of an integer data type? 42
10. Which data type is used to represent textual data? String
11. Which variable name is valid in most programming variable_123
languages?
12. Which statement correctly assigns the value 10 to the x = 10
variable x?
, Introduction to Computer Science - D684 WGU
Study online at https://quizlet.com/_gyclbs
13. Which is used for iteration in programming? While loop
14. What is the result of the expression 2 + 3 x 4? 14
15. Which operator has the highest precedence? x
16. Which value is a floating-point number? 3.14
17. What is the result of the expression (2 + 3) x 4? 20
18. What is the main purpose of object-oriented program- To organize code into
ming (OOP)? reusable components
called objects
19. Which statement describes a class in OOP? A blueprint for creating
objects
20. What is encapsulation in OOP? The practice of keeping
data and methods that
manipulate the data in a
single unit
21. Which feature of OOP allows programmers to create Inheritance
new classes based on existing classes?
22. What is polymorphism in OOP? The ability of different ob-
jects to respond to the
same method in different
ways
23. Which keyword is used in many programming lan- New
guages to create a new instance of a class?
24.
, Introduction to Computer Science - D684 WGU
Study online at https://quizlet.com/_gyclbs
What does the term "inheritance hierarchy" refer to in The organization of class-
OOP? es into a tree structure
based on inheritance rela-
tionships
25. What does the term "object" refer to in OOP? An instance of a class
containing attributes and
methods
26. Which principle of OOP is demonstrated by restricting Encapsulation
access to certain parts of an object?
27. What does the term "abstraction" refer to in OOP? The practice of hiding the
complex implementation
details and showing only
the necessary features
28. Which value is stored as an integer in computer pro- 21
gramming?
29. Which coding construct repeats a task while a condi- Iteration
tion is true?
30. How are items accessed in a stack? The last item to be added
becomes the first item re-
moved.
31. A web browser puts websites into a viewing history Stack
log and accesses the most recent one when the back
button is clicked. Which data structure would be ap-
propriate for this situation?
32. What is the relationship between a parameter and an A parameter is a tempo-
argument? rary variable in a func-