
ADS Quiz 2
Authored by Naman Chauhan
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is an array of integers initialized in C++?
int arr[5] = {1, 2, 3, 4, 5};
int arr[] = {1, 2, 3, 4, 5};
int arr = {1, 2, 3, 4, 5};
int arr[5] = 1, 2, 3, 4, 5;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true for the initialization of a C++ array?
Arrays must always be initialized explicitly in C++
Arrays are automatically initialized with zero values in C++
C++ allows both explicit and default initialization for arrays
Arrays cannot be initialized in C++
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the term "contiguous memory" mean in the context of arrays?
Each element of an array is stored in a different location in memory
The elements of the array are stored in consecutive memory locations
Arrays in C++ don't use memory
Memory in arrays is randomly allocated
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to declare a dynamically allocated array in C++?
int arr[5];
int* arr = new int[5];
int arr = new int[5];
int arr(5);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to deallocate memory used by a dynamically allocated array in C++?
delete arr;
delete[] arr;
free(arr);
dealloc(arr);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax to define a two-dimensional array in C++?
int arr[3][4];
int arr[4, 3];
int arr(3)(4);
int[3][4] arr;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default initialization value for elements of an array in C++ when no value is provided?
Zero
Garbage value
Null
Undefined
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
50 questions
ICT 51-100
Quiz
•
University
48 questions
OSI Layer
Quiz
•
12th Grade - University
50 questions
marketing căn bản
Quiz
•
University
51 questions
EXCEL BASICO
Quiz
•
University
49 questions
Quiz on C Operators
Quiz
•
University
45 questions
Luyện tập trắc nghiệm MS Word 2016 (Bài 02)
Quiz
•
University
49 questions
sal vize
Quiz
•
University
46 questions
CompTIA ITFundamentals CRAM
Quiz
•
6th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University