1. Directions: The question or incomplete
A. second -- first
statement be- low is followed by four
suggested answers or comple- tions. Select the
one that is best in each case.
The code segment below is intended to swap
the val- ues of the variables and using a
temporary variable, .
Which of the following can be used to replace
so that the code segment works as intended? Calling the phone
num- ber given in the
2. A bank customer receives an e-mail from a
e-mail and providing
sender claiming to be a bank employee. The e-
the personal in-
mail asks the customer to provide personal
formation over the
information and to call a phone number if he
phone
or she has any questions. The customer
suspects the e-mail might be a phishing at-
tempt. Which of the following responses is
most likely to be a privacy risk for the bank
customer?
3. Which of the following would be the best use of citizen An
experiment that re-
science? 5. The ticket
Responses prices at a
movie
theater are
4. A student is writing a program to model given below.
different real-world events using simulations.
Which of the fol- lowing simulations will
generate a result that would best be stored
using a Boolean variable?
1/
27
, MCQ Practice Exam Test.
uires data measurements to be taken in many ditter- ent locations
imulating a Fair coin
Ticket price --- 12
age Less than or equal to
A programmer is creating an algorithm to set the value 12 OR age
greater than or
of based on the information in the table. The equal to 60 price
pro- grammer uses the integer variable for is 9 If a 3D
the age of the moviegoer. The Boolean
variable is when the movie is
2/
27
, MCQ Practice Exam Test.
3-D and otherwise. Ticket price --- ticket price
Which of the following code segments correctly + 5
sets the value of ?
6. Which of the following best describes the role Developing standards
of the Internet Engineering Task Force (IETF) ? and protocols for
Internet
communication
7. Consider the following program, which uses the
vari- ables start, end, and current. C. 3 4
Start - 1
end - 20
current -3
start -
current
current - current
+1 Display (start)
DIsplay (current)
What is displayed as a result of executing the
program?
8. A smartphone stores the following data for each photo I and II only
that is taken using the
phone. The file name of the
photo
The date and time the photo was taken
The geographic location where the photo was
taken Assume that all of the photos that have
been taken on the phone are accessible. Which
of the following can be determined using the
photo data described above?
I. The number of photos that were taken at a
particular geographic locationII. The number of
3/
27