
C++ Arrays Quiz
Authored by Ahmed Yaseen
Computers
9th - 12th Grade
Used 3+ 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
What is an array in C++?
A collection of variables of different types
A collection of variables of the same type
A variable that holds multiple types
A dynamic data structure
2.
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 compiler
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare an array of 10 integers in C++?
`int arr[10];`
`array arr(10);`
`int arr = new int[10];`
`int[] arr = new int[10];`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following accesses the 5th element of an array `arr` in C++?
`arr[5]`
`arr[4]`
`arr[6]`
`arr[0]`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to print an element outside the bounds of an array in C++?
هيحصل ايه لو حاولت انك تطبع عنصر بره الرينج بتاع الاراي
It will return 0
It will return garbage value
It will throw an error
The program will stop executing
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the size of an array declared as `int arr[10];` in C++?
9
10
Undefined
Depends on the elements
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes a 2D array in C++?
An array of arrays
A dynamic structure
A collection of different data types
A single-dimensional array
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
10mo Evaluación
Quiz
•
10th Grade
15 questions
Databases
Quiz
•
11th Grade
10 questions
HTML (3CS)
Quiz
•
10th - 11th Grade
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
13 questions
RAM&HDD/SSD
Quiz
•
10th - 12th Grade
15 questions
Chapter 3: Storage devices and media (Part 2):
Quiz
•
10th - 11th Grade
15 questions
11° Evaluación bimestral de informática
Quiz
•
11th Grade
10 questions
Server Administration- Quiz 1
Quiz
•
12th Grade - University
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade