150k views
0 votes
The variable cp_arr has been declared as an array of 26 pointers to char. Allocate 26 character values, initialized to the letters 'A' through 'Z' and assign their pointers to the elements of cp_arr (in that order).

User PatriceVB
by
6.0k points

1 Answer

3 votes

Answer:

void main(){

char*[] cp_arr= new char*[20];

char ch;

int i=0;

for(ch='A';ch<='Z';ch++){

*cp_arr[i]=ch;

i++;

}

}

Step-by-step explanation:

we are taking a char array of pointers and iterating a loop to store A to Z values in that array in the mentioned order

User Javier Gonzalez
by
6.0k points