D684 - Introduction to Computer Science - CH.1 Test
1. Which value is stored as an integer in computer programming?
-
"0"
-
true
- -306.5
- 21: 21
2. Which coding construct repeats a task while a condition is true?
-
Iteration
-
Input/output
-
Selection
-
Assignment:
Iteration :
The iteration construct, or the looping construct, uses a while statement to perform the same task
over and over again
as long as a condition is true.
3.
How are items accessed in a stack?
- The item removed is the one that has been in the longest time.
- All items can be added to or removed from any location.
- The last item to be added becomes the first item removed.
- All items can be accessed or changed but not easily inserted or
removed.: The
last item to be added becomes the first item removed.
4.
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?
-
Record
-
List
-
Queue
-
Stack:
Stack
5. What is the relationship between a parameter and an argument?
- A parameter is passed to a function by reference, whereas an
argument is
passed by value.