
Arrays

Quiz
•
Computers
•
University
•
Medium
Ramanh Muon
Used 30+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is a valid C++ array definition?
int array[0];
float $$payments[10];
void numbers[5];
int nums[10];
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The subscript (or index) of an array can be…
an integer
a floating point number
a character
a negative number
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the following code do?
for (int index = 0; index < 5; index++)
cin >> numbers[index];
Place data into a four element array called numbers.
Place data into a four element array called index.
Place data into a five element array called numbers.
Place data into a five element array called index.
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following array declarations is invalid?
bool array1[10];
double array2[20,0];
char array3[30];
double array4[7];
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In the statement a[3] = 5, which of the following is the index value?
a
3
a[3]
5
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
If you leave out the size declarator in an array definition:
You must provide an initialization list
You are not required to initialize the array elements
All array elements default to zero values
Your array will contain no elements
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
An array can store a group of values, but the values must be…
the same data type
each of a different data type
constants
integers
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Computer Science Quiz

Quiz
•
University
20 questions
DSA Energizer

Quiz
•
University
15 questions
Array Java

Quiz
•
University
23 questions
Java Array

Quiz
•
University
20 questions
Arrays

Quiz
•
University
15 questions
QUIZ

Quiz
•
University
15 questions
Soal Java

Quiz
•
11th Grade - University
20 questions
Apuntadores en C

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade