W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
10 questions for “RAII & Smart Pointers”
Found in 1 field. Select a question to see its full answer.
Information Technology
10 questions in 1 technology
#
Question
Technology
Topic
Level
1
What is
RAII
and how does it relate to memory management?
C++ › Memory Management
C++
Memory Management
Intermediate
2
What is the difference between the stack and the heap?
C++ › Memory Management
C++
Memory Management
Beginner
3
What do new and delete do?
C++ › Memory Management
C++
Memory Management
Beginner
4
What is a memory leak?
C++ › Memory Management
C++
Memory Management
Beginner
5
What is a dangling pointer and how does it arise?
C++ › Memory Management
C++
Memory Management
Intermediate
6
What is the difference between malloc/free and new/delete?
C++ › Memory Management
C++
Memory Management
Intermediate
7
What is placement new?
C++ › Memory Management
C++
Memory Management
Intermediate
8
How do you read a file with ifstream and write with ofstream?
C++ › I/O Streams
C++
I/O Streams
Intermediate
9
What is the difference between a memory leak and a resource leak?
C++ › Memory Management
C++
Memory Management
Advanced
10
What is capturing by move (init capture) and when is it needed?
C++ › Lambda Expressions
C++
Lambda Expressions
Advanced