Question: suppose a C / C + + array data was originally declared to have 1 0 elements as follows: int nElements = 1 0 ;

suppose a C/C++ array "data" was originally declared to have 10 elements as follows:
int nElements =10;
double data [nElements];
how can the array size be increased to 20 elements?
a. by changing variable nElements to 20
b. by redeclaring data as "double data[20];"
c.by storing a number in 20th position of data[].
d.error
e.impossible

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 Programming Questions!