Which of the following can be considered as the correct syntax for declaring…

KSET 2024

Which of the following can be considered as the correct syntax for declaring an array of pointers of integers that has a size of 20 in C++ ?

  1. A.

    int arr = new int [20];

  2. B.

    int *arr = new int * [20];

  3. C.

    int **arr = new int * [20];

  4. D.

    int *arr = new int [20];

Attempted by 6 students.

Sign up free to check your answer

Sign up free

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…