
Quiz PF Topic 4 Array
Authored by Athirah Musa
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to declare an array of integers in C++?
int array[10];
array int[10];
int[10] array;
int array(10);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize an array with the values 1, 2, 3, 4, 5 in C++?
int arr[] = {1, 2, 3, 4, 5};
int arr[5] = {1, 2, 3, 4, 5};
Both int arr[] = {1, 2, 3, 4, 5}; & int arr[5] = {1, 2, 3, 4, 5};
int arr(5) = {1, 2, 3, 4, 5};
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a C++ array?
0
1
-1
Depends on the array size
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements correctly accesses the third element of an array named arr?
arr[2]
arr(3)
arr{}
arr[3]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
int arr[5] = {1, 2, 3, 4, 5};
cout << arr[1] + arr[3];
5
6
7
8
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code output?
int arr[3] = {1, 2, 3};
cout << arr[1];
1
2
3
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare an integer array of size 5 in C++?
int array[5];
array int[5];
int[5] array;
int array(5);
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
BÀI 8. SẮP XẾP VÀ LỌC DỮ LIỆU
Quiz
•
1st - 12th Grade
10 questions
Pengaturcaraan
Quiz
•
12th Grade
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
12 questions
Електронні таблиці Exel
Quiz
•
1st - 12th Grade
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
10 questions
Les variables sous Python
Quiz
•
10th - 12th Grade
14 questions
Archivos Digitales
Quiz
•
9th Grade - University
10 questions
Parcial-Dibujo
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade