C++ | new and delete | Question 1
How to create a dynamic array of pointers (to integers) of size 10 using new in C++?
Hint: We can create a non-dynamic array using int *arr[10]
(A) int *arr = new int *[10];
(B) int **arr = new int *[10];
(C) int *arr = new int [10];
(D) Not Possible
Answer: (B)
Explanation:
Quiz of this Question
Recommended Posts:
- C++ | new and delete | Question 5
- C++ | new and delete | Question 3
- C++ | new and delete | Question 4
- C++ | new and delete | Question 2
- "delete this" in C++
- delete and free() in C++
- C program to delete a file
- C++ | Inheritance | Question 5
- C++ | Inheritance | Question 6
- C++ | Inheritance | Question 7
- C++ | Templates | Question 1
- C++ | Inheritance | Question 8
- C++ | Inheritance | Question 9
- C++ | Templates | Question 2
- C++ | Templates | Question 3



