Back-End Programming Exam  >  Back-End Programming Questions  >  How to create a dynamic array of pointers (to... Start Learning for Free
How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
How to create a dynamic array of pointers (to integers) of size 10 usi...
Creating a Dynamic Array of Pointers to Integers in C Using new

When working with arrays in C, it is often necessary to create dynamic arrays that can be resized at runtime. In this case, we want to create a dynamic array of pointers to integers of size 10 using new in C.

Option B is the correct answer because it creates a dynamic array of pointers to integers of size 10 using new in C. Here is how it works:

- Option A: int *arr = new int *[10];

This option creates a static array of 10 pointers to integers. It is not dynamic because the size of the array cannot be changed at runtime. Therefore, this option is not correct.

- Option B: int **arr = new int *[10];

This option creates a dynamic array of 10 pointers to integers. The double asterisk indicates that we are creating an array of pointers. The new keyword allocates memory for the array and returns a pointer to the first element. Therefore, this option is correct.

- Option C: int *arr = new int [10];

This option creates a dynamic array of 10 integers. It is not an array of pointers to integers, so it is not correct for our purposes.

- Option D: Not Possible

This option is not correct because it is possible to create dynamic arrays of pointers to integers in C using new.

In summary, option B is the correct answer because it creates a dynamic array of pointers to integers of size 10 using new in C.
Free Test
Community Answer
How to create a dynamic array of pointers (to integers) of size 10 usi...
Why we use double pointer

Explore Courses for Back-End Programming exam
Question Description
How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? for Back-End Programming 2025 is part of Back-End Programming preparation. The Question and answers have been prepared according to the Back-End Programming exam syllabus. Information about How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for Back-End Programming 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer?.
Solutions for How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Back-End Programming. Download more important topics, notes, lectures and mock test series for Back-End Programming Exam by signing up for free.
Here you can find the meaning of How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer?, a detailed solution for How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice How to create a dynamic array of pointers (to integers) of size 10 using new in C++? Here, one 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 PossibleCorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice Back-End Programming tests.
Explore Courses for Back-End Programming exam

Top Courses for Back-End Programming

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev