Algorimt/program-2
Quiz
•
Information Technology (IT)
•
University
•
Easy
H1ro [kz]
Used 4+ times
FREE Resource
59 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is an array in C++?
A collection of elements of the same type stored in contiguous memory locations
A single variable that holds multiple values of different types
A function that performs calculations
A keyword for declaring variables
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
How do you declare an integer array of size 5 in C++?
int array[5];
array<int> arr(5);
int array = {5};
int array[];
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What is the index of the first element in an array?
0
-1
1
Depends on the array size
4.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will happen if you access an array index that is out of bounds?
It will return 0 by default
The program will crash
Undefined behavior
Compiler error
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which of the following is NOT a valid array declaration?
int arr[5];
double data[] = new double[5];
float numbers[10];
char str[20];
6.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
Which statement correctly initializes an array?
int arr[3] = {1, 2, 3};
int arr = {1, 2, 3};
arr[3] = {1, 2, 3};
int arr[3]; arr = {1, 2, 3};
7.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the output of the following code? int arr[] = {10, 20, 30, 40}; cout << arr[2];
30
20
10
40
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
55 questions
final quizizz level up
Quiz
•
University
60 questions
Bài tập trắc nghiệm Tin học NH P2
Quiz
•
University
63 questions
Fundamentos de MS-DOS y Linux
Quiz
•
University
62 questions
C++ Arrays Quiz
Quiz
•
University
56 questions
ITC 214 - Data Structures and Algorithm - Pretest
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Information Technology (IT)
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
25 questions
Waves-8th Grade Physical Science
Quiz
•
KG - University
41 questions
Unit 8 Key Terms
Quiz
•
11th Grade - University
10 questions
Product & Quotient Derivative Rules
Quiz
•
University
5 questions
How to Calculate Force - Newton's 2nd Law of Motion
Interactive video
•
10th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
