
Quiz on One-Dimensional and Two-Dimensional Arrays

Quiz
•
Other
•
University
•
Hard
John Escol
Used 1+ times
FREE Resource
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the starting index of a one-dimensional array in C?
-1
0
2
1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax to declare a one-dimensional array?
array_name data_type[array_size];
array_name[] data_type;
data_type array_name[array_size];
data_type array_name[];
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the term 'initialization' refer to in the context of arrays?
Assigning values to the array
Updating array values
Accessing array elements
Declaring the array
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you initialize a one-dimensional array without specifying its size?
data_type array_name[] = {1, 2, 3};
data_type array_name = {1, 2, 3};
data_type array_name[3];
data_type array_name[3] = {1, 2, 3};
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the array subscript operator []?
To update an array
To initialize an array
To access elements of an array
To declare an array
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop can be used to initialize an array after its declaration?
for loop
if statement
switch case
do-while loop
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to update an element in a one-dimensional array?
array_name[index] = old_value;
new_value = array_name[index];
array_name[index] = value;
array_name[index] = new_value;
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
QUALITY OF SERVICE

Quiz
•
University
15 questions
CHAPTER 6 :MATERIAL PROCESSING (1)

Quiz
•
University
15 questions
Private Label

Quiz
•
University
15 questions
Quizomania - Pragati 2025 Round 1

Quiz
•
University
20 questions
Quiz Round-2

Quiz
•
University
20 questions
UAS Algoritma dan Pemrograman

Quiz
•
University
17 questions
Basics of Programming with C

Quiz
•
University
20 questions
CodeMavarick

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

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

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University