What is a 2D array in C++?

2D Array in C++ Quiz

Quiz
•
Information Technology (IT)
•
6th Grade
•
Easy
Salma Ghoneim
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
An array of functions
An array of strings
An array of arrays
A pointer to a pointer
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you declare a 2D array with 3 rows and 4 columns of integers?
int arr[3,4];
int arr(3,4);
int arr[3][4];
int arr{3}{4};
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the index of the first element in a 2D array?
[0][1]
[1][0]
[0][0]
[1][1]
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following correctly accesses the element in the second row and third column?
arr[2][3]
arr[1][2]
arr[3][2]
arr[2][1]
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which loop structure is commonly used to traverse a 2D array?
Single for loop
While loop
Nested for loops
Switch case
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If int arr[2][3] = { {1, 2, 3}, {4, 5, 6} }; what is the value of arr[1][2]?
3
4
5
6
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code? int arr[2][2] = { {1, 2}, {3, 4} }; cout << arr[0][1];
1
2
3
4
Create a free account and access millions of resources
Similar Resources on Wayground
8 questions
Python программалау негіздері

Quiz
•
6th Grade
6 questions
Mainīgie, datu tipi, aritmētiskie aprēķini (Python)

Quiz
•
6th - 8th Grade
10 questions
Fundamentos de la Programación - Cuarto

Quiz
•
6th - 8th Grade
15 questions
6 клас. І семестр. Діагностувальна КР. Варіант 2

Quiz
•
6th Grade
15 questions
Повторение модуль 1

Quiz
•
6th - 8th Grade
13 questions
Algoritmica

Quiz
•
1st Grade - University
13 questions
_06_03__Réalisation d'un site web dynamique avec PHP

Quiz
•
6th Grade
10 questions
Kuis Sistem Komputer (Hardware dan Software)

Quiz
•
6th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade