
dynamic memory allocation in C++

Quiz
•
Computers
•
University - Professional Development
•
Medium
noore ilahi
Used 54+ times
FREE Resource
Student preview

10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The size of both stack and heap remains the same during run time.
True
False
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dynamic memory in C++ is allocated from which type of memory?
Static
Heap
Stack
Program Code
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Functions and variables use _____ memory when created/accessed in C++.
Heap
Stack
Static
Program code
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can we allocate memory for the objects dynamically in CPP?
Yes
No
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In CPP, dynamic memory allocation is done using ______________ operator.
malloc
alloc
new
allocate
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following operator is used to release the dynamically allocated memory in CPP?
delete
remove
free
both b and c
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is/are valid ways to allocate memory for an integer by dynamic memory allocation in CPP?
int *p = new int(100);
int *p; p = new int; *p = 100;
int *p = NULL; p = new int; *p=100;
Only 1,2
All of the above
Create a free account and access millions of resources
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

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

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
5 questions
Setting goals for the year

Quiz
•
Professional Development
2 questions
Pronouncing Names Correctly

Quiz
•
University
14 questions
Disney Trivia

Quiz
•
Professional Development
14 questions
2019 Logos

Quiz
•
Professional Development
12 questions
Civil War

Quiz
•
8th Grade - University