Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Individual Questions 1. Explain the concept of a pointer in C++. (2 marks) 2. Why do we have the heap as well as the
2 Individual Questions 1. Explain the concept of a pointer in C++. (2 marks) 2. Why do we have the heap as well as the stack? (2 marks) 3. Why is it important to call delete at some point after calling new? (1 mark) 4. What happens if we call delete twice on the same pointer? (1 mark) 5. We have a function with three parameters: a pointer to a character array (also known as a C-String), and two pointers to specific characters (we will assume that they point to characters in the C-String) void stringPointerOperation(char* str, char* firstPtr, char* secondPtr)1 cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started