stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
AP CSP Exam Review TM new Flashcards | StudBud
Explore
/
AP CSP Exam Review TM new
AP CSP Exam Review TM new
74 terms
·
StudBud Administration
·
23 plays
Practice questions for the AP CSP Exam.
Flashcards
74 cards
F
Practice quiz
P
Host live
L
Questions
74
Answers
1
Why is it important to find an efficient solution to a problem?
An efficient solution uses more resources to verify the results as correct.
An efficient solution can always be solved in a reasonable amount of time.
An efficient solution makes it harder to copy an algorithm.
An efficient solution can make it easier to analyze larger data sets.
2
Which of the following is a true statement about data transmitted over the internet?
All data traveling over the internet is in binary.
The (DNS) has been challenged by the Digital Millennium Copyright Act.
Redundancy in the design of the internet is overseen by large companies.
Packets are received in the same order that they are sent.
3
The Caesar cipher is an example of what type of encryption?
Symmetric encryption
Public key encryption
Home key encryption
No key encryption
4
What is the minimum number of searches for a binary search using an ordered list of 100 numbers?
1
100
0
8
5
Which of the following illustrate ways that the internet facilitates collaboration
II and III only
I only
I and III only
I, II, and III
6
Which of the following is true about data compression?
Data compression can be used for pictures and video only.
Lossless data compression is the best compression under all conditions.
Lossy compression cannot be used when sending pictures.
Data compression can be used to reduce the size of a file for storage.
7
Consider the following question
No error; the program works as intended
Syntax error
Runtime error
Logical error
8
What will the following code segment display?
1
30
22
10
9
What will be the output of the following program?
7 5 9
14 6
9 5 7
14
10
Consider the following question
When you email a picture, some of the picture data will be lost in process
The files used lossy compression so it could be small enough to be emailed
The files used lossless compression so it could be small enough to email
When sending pictures, the file was broken down into packets then assembled
11
Consider the following question
IF(number = randomNumber)
IF(number = true AND randomNumber = drawing)
IF(number = true OR randomNumber = true)
IF(number ≠ randomNumber)
12
What will the following program display?
OXXOO
The program is an infinite loop.
OXXOXXOXX
OOOXX
13
Which command can replace <Missing Condition> to result in the last column of the table shown below?
NOT (a AND b)
b AND (a AND b)
a OR b
a AND (a AND b)
14
How many bytes is 1 kilobyte?
10
1
100
1,000
15
What is the minimum number of lines that must be cut to isolate F completely?
6
4
8
0
16
Consider the following question
I, III, IV, II
I, IV, II, III
III, I, II, IV
I, Il, III, IV
17
Why does program code have to be run through a compiler?
Program code must be translated into a language the computer understands.
Program code must be debugged by the compiler before it can ever run.
It doesn’t, as the new program could be run directly from the code.
Program code is write-only until it is run through a compiler.
18
Consider the following question
DNS
FTP
TCP
HTTP
19
What is the maximum number of searches required if using a linear search on list containing 2,000 numbers?
11
2,000
1,000
1
20
In the following flowchart, what is the value of RESULT?
Always false
True when either A or B is true
Always true
True when both A and B are true
21
Consider the following question
Packets are sent by the quickest path possible in the correct order.
Packets are sent in multiple paths and can be received out of order.
Packets are received in the order that they are sent.
All of the above.
22
In what order will the numbers appear after running the algorithm below?
5, 7, 4, 3.5
5, 7, −6, 7
5, 6, 3, 3
5, 6, −5, 6
23
How many lines need to be cut to completely isolate computer E from computer C?
3
4
7
8
24
What will the following code segment display?
Nothing will be displayed due to an error.
11
6
3
25
What is the code segment displaying?
68
34
17
0
26
Which best describes the role of TCP?
A protocol for encrypting and decrypting data transferring on the internet
The foundation of data communication for the World Wide Web
Assigning rules and a label for each device connected to the internet.
The set of rules for the path packets taken on the fault-tolerant internet
27
Which of the following lines of code would cause an error with a robot?
NOT CAN_MOVE (left)
CAN_MOVE (right)
NOT CAN_M0VE (forward)
CAN_MOVE (north)
28
Which of the following statements are true about undecidable problems in computer science?
I and II
I only
II and III
I, II, and III
29
Consider the code segment below.
What is your name? Hello Karel
"What is your name?"; new line; "Hello"; new line; "Karel"
Hello Karel
"What is your name?"; new line; "Hello Karel"
30
Consider the following code segment: What will the executed code display?
All even numbers between 3 and 12
All even numbers between 1 and 12
All odd numbers between 3 and 12
All odd numbers between 1 and 12
31
Which of the following is NOT metadata for the picture?
The location where the picture was taken
The picture of the dog
The memory space taken up by the picture
The time the picture was taken
32
What is displayed after the following algorithm is run?
132
50
32
100
33
What would be a good use of constants when initializing variables at the beginning of a program?
I, II, and III
I and II only
II and III only
I and III only
34
Consider the following procedure, mystery( x, y ). What is returned by mystery (1, 2)?
2
10
8
4
35
In what order will the numbers appear after running the algorithm below?
5, 7, 4, 3.5
5, 7, −6, 7
5, 6, 3, 3
5, 6, −5, 6
36
Consider the following question
( list1[0] = list1[1] )
( list1[1] = list1[LENGTH(list1)] )
( list1 = list1 )
( list1[0] = list1[LENGTH(list1) – 1] )
37
What is displayed after running the algorithm below?
145
12
133
43
38
What type error that's hard to see?
Overflow error
Runtime error
Syntax error
Logical error
39
Metadata is data about data. Read the following statements about metadata types. Which of the statements below are true?
II, III, and IV only
I only
I, II, and IV only
All of the above
40
Binary search can find an item in an unsorted list.
False
True
41
Consider the following question
[ ]
[4, 6, −4]
[1, 35, 6, 76, 4, 98, 5, 1, 8, 96, −4]
[1, 6, −4]
42
What should replace <missing condition> so that the program below displays TRUE 60% of the time?
x >= 6
x >= 9
x < 6
x > 10
43
Which of the following is a cause of the digital divide?
All of the above
Lack of access to technology due to location
Lack of knowledge on how to use technology
Lack of access to the technology due to affordability
44
The following picture was taken by a smartphone. Which of the following is NOT metadata?
The Red, Green, and Blue values of the top left pixel
The filename
The date the photo was taken
The geographic location where the picture was taken
45
What is the code below displaying?
3, 6, 9, 12, 15
Nothing will be displayed
2, 4, 6, 8, 10, 12, 14
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
46
Which of the following is true about redundancy on the internet?
I only
II and III only
I and II only
I, II, and III
47
Consider the following question
2 ^ 96 as many addresses
Twice as many IP addresses
2 ^ 2 as many IP addresses
96 as many IP addresses
48
Consider the following question
moveAndSpin(4, 1); moveAndSpin(6, 1)
moveAndSpin(0, 1); moveAndSpin(6, 3); moveAndSpin(4, 0)
moveAndSpin(7, 3)
moveAndSpin(0, 7)
49
Which of the following test cases will NOT find the maximum number in the list?
list1[0, 0, 0, 0]
list1[−23, −67, −3, −7]
list1[4]
list1[23, 67, 3]
50
Which of the codes below will correctly swap the frog with the bear?
animal[1] = animal[2]animal[2] = animal[1]
temp = animal[1]animal[1] = animal[2]animal[2] = temp
animal[3] = animal[1]animal[1] = animal[3]
temp = animal[1]animal[1] = animal[3]animal[3] = temp
51
Which of the following is the MOST likely data privacy concern of the upgraded game?
How many locations the player visited
Recording whether the player was speeding when driving to a location.
How much time a person spent playing the game
The player’s score
52
Consider the following question
numbers[3, 5, 11, 6]
numbers[0, 1, 35, 6]
numbers[1, 1, 35, 6]
numbers[11, 35, 6]
53
Consider the following code segment, which uses the variables a, b, and c.
11 3 8
3 11 3
8 4 6
3 3 6
54
Consider the following question
Graphs can be easily placed into a slideshow/document, while tables can't.
Graphs are able to show all of the detail necessary to understand data.
Graphs can show trends that might not be easily seen with raw data.
Graphs are harder to read and interpret at a glance.
55
When should a heuristic algorithm be used?
When finding the lifetime batting average of Mookie Wilson
When finding the quickest way to drive from Orlando, FL, to Cold Foot, AL
When calculating the average score for the national SAT test
When deciding which files could have been exposed to a virus or not.
56
Consider the following question
b = temp
temp = a
b = a
temp = b
57
What could a single binary value represent?
If a light is on or off
Temperature in degrees Celsius
Time
Volume on a radio
58
Which of the following are benefits to having information be easily accessible and changeable?
II and III only
I only
I, II, and III
I and II only
59
What is the minimum number of binary digits needed to store the number 56?
5
1
3
6
60
Which of the following types of components is necessary for cybersecurity?
I, II, and III
I only
I and II only
III only
61
Consider the following segment
Dog Cat Fish Golden Bandicoot
Dog Cat Fish
Golden Bandicoot Cat Fish
Dog Golden Bandicoot Cat Fish
62
Consider the following code segment, which uses the variables x, y, and z. What will the following program display?
12 12 12
12 24 24
6 12 24
24 24 24
63
cube(n) is meant to multiply a number by itself three times. What is returned by cube(cube(2))?
8
64
512
128
64
What does the algorithm display?
3
7
4
5
65
What percentage of the time will the program display an even number?
50%
20%
10%
40%
66
Why are internet protocols used?
They don't make the internet scalable and encourage growth.
They're specific to the hardware attached to the internet.
They're needed to slow the growth of the internet.
They're set of rules to ensure the internet can work and transmit data.
67
What is the following program returning?
37
27
20
25
68
What will the program segment display?
99
2
3
34
69
Consider the following question
1.75 seconds
175 seconds
571 seconds
57.1 seconds
70
Which of the following is a negative trade-off inherent in lossless compression?
The number and size of pixels will be less.
The image quality will be less and will result in a blurry image.
The file can be difficult to email and can take up lots of memory storage.
Some of the data will be lost and cannot be recovered.
71
Consider the following question
Addition transformation
Lossless transformation
Frequency transformation
Lossy transformation
72
What are two aspects of efficiency?
wall clock time and CPU time
execution time and memory usage
execution time and length of code
memory usage and length of code
73
Which of the following considerations is likely to affect the ability of the program to process large data sets?
How much memory the program requires to run
How many program statements the program contains
The order of the data put into the data set
The amount of program documentation that should be minimized
74
Consider the following question
I, III, and IV only
All of the above
II, IV, and V only
I, II, III, and V only