
AP CSA Arrays (6.1)

Quiz
•
Computers
•
10th Grade
•
Hard
Herman Galioulline
Used 27+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following code segments, when appearing in another method in the same class as getValue, will print the value 70?
int arr = {40, 30, 20, 10, 0};
System.out.println(getValue(arr, 1, 2));
int[] arr = {40, 30, 20, 10, 0};
System.out.println(getValue(arr, 1, 2));
int[] arr = {50, 40, 30, 20, 10};
System.out.println(getValue(arr, 1, 2));
int arr = {40, 30, 20, 10, 0};
System.out.println(getValue(arr, 2, 1));
int arr = {50, 40, 30, 20, 10};
System.out.println(getValue(arr, 2, 1));
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following code segments, appearing in the same class as the addNum method, will result in array2 having the contents {0, 0, 13, 0, 9, 0, 0}?
int[] array1 = {5, 2, 8, 6, 4, 3, 9};
int[] array2 = addNum(array1, 2, 4, 5);
int[] array1 = {-5, -5, 13, 0, 9, 0, 0};
int[] array2 = addNum(array1, 2, 4, 5);
int[] array1 = {5, 2, 8, 6, 4, 3, 9};
int[] array2 = addNum(array1, 3, 5, 5);
int[] array1 = {5, 8, 2, 4, 6, 3, 9};
int[] array2 = addNum(array1, 2, 4, 5);
int[] array1 = {0, -5, 8, 0, 9, 0, 0};
int[] array2 = addNum(array1, 2, 4, 5);
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following code segment.
int[] arr = {1, 2, 3, 4, 5};
Which of the following code segments would correctly set the first two elements of array arr to 10 so that the new value of array arr will be {10, 10, 3, 4, 5}?
arr[0] = 10;
arr[1] = 10;
arr[1] = 10;
arr[2] = 10;
arr[0, 1] = 10;
arr[1, 2] = 10;
arr = 10, 10, 3, 4, 5;
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
I only
II only
III only
I and II
I and III
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following method, which is intended to return the number of strings of length greater than or equal to 3 in an array of String objects.
II only
III only
I and III only
II and III only
I, II, and III
Similar Resources on Wayground
5 questions
AP Computer Science A Unit 6 Lesson 1 (Introduction)

Quiz
•
10th - 12th Grade
10 questions
SUMIFs and COUNTIFs Functions Quiz

Quiz
•
9th Grade - University
10 questions
AP CS A Unit 6 Quiz PRACTICE

Quiz
•
9th - 12th Grade
10 questions
AP CSA Unit 1 & 2 Review

Quiz
•
9th - 12th Grade
10 questions
Variables and Data Types

Quiz
•
10th - 12th Grade
9 questions
quis lat soal

Quiz
•
9th - 12th Grade
8 questions
String Handling in Java

Quiz
•
10th Grade
10 questions
Java-Quiz 2

Quiz
•
10th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade