
C++ Arrays Quiz

Quiz
•
Science
•
9th - 12th Grade
•
Medium
Fidaa Abed
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an array in C++?
A collection of variables with different types
A class with multiple constructors
A variable that can store multiple values of the same type
A type of loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following declaration do? int tests[5];
Creates 6 integer variables
Allocates memory for 5 integers
Creates 5 functions
Declares 5 arrays
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the subscript of the first element in an array?
1
-1
0
Depends on the compiler
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How much memory does int tests[5]; use if each int takes 4 bytes?
5 bytes
10 bytes
20 bytes
25 bytes
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement accesses the third element in int tests[5];?
tests(2)
tests[3]
tests[2]
tests.3
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is true about the size declarator in an array?
It must be a float
It specifies the number of characters
It shows how many elements the array can hold
It cannot be a constant
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid array declaration using a constant?
const int SIZE = 5; int data(SIZE);
int SIZE = 5; data[SIZE];
const int SIZE = 5; int data[SIZE];
int data[];
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Pictures and Sound in Computers

Quiz
•
9th Grade
9 questions
Backup 4

Quiz
•
12th Grade
10 questions
Integral Tentu

Quiz
•
10th - 12th Grade
15 questions
bài tập mảng tiết 1

Quiz
•
11th Grade
15 questions
PICAXE-18M2

Quiz
•
9th - 12th Grade
13 questions
Java RocketSkills

Quiz
•
11th Grade
10 questions
Q3 Física

Quiz
•
7th Grade - University
12 questions
Unit 5 - Week 6 (Concept Review)

Quiz
•
10th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Science
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade