Question: Given that int n has already been declared as a non - constant variable and has been initialized to a positive value, declare nums to

Given that int n has already been declared as a non-constant variable and has been initialized to a positive value, declare nums to be an array of integers whose size is n.
int *nums = new int[n];
int nums[n];
int nums[]={n};
One cannot declare an array with a non-constant size in C++.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!