
C++ Arrays Quiz

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Ahmed Yaseen
Used 3+ 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 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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Unit 8 - Searching and Sorting

Quiz
•
9th - 12th Grade
10 questions
C Programming - Dia Aberto - EPC

Quiz
•
9th - 12th Grade
10 questions
Quiz 15 - Array Basics

Quiz
•
11th Grade
10 questions
Quiz 16 - Arrays and Loops

Quiz
•
11th Grade
6 questions
PPS MCQ on 22.11.2024

Quiz
•
10th Grade - University
15 questions
Area and Arrays

Quiz
•
10th - 12th Grade
15 questions
Area With Arrays

Quiz
•
10th - 12th Grade
12 questions
Массивы C++

Quiz
•
10th - 11th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
40 questions
Algebra Review Topics

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade