Question: What is the output from the code snippet below? int * index [ 5 ] ; int data [ 1 0 ] = { 4

What is the output from the code snippet below?
int* index[5];
int data[10]={4,8,1,3,5,9,3,2,6,0};
int i =0;
int* p = &data[9];
for (int i =0; i <5; i++)
{
index[i]= p;
p--;
}
for (int i =0; i <5; i++)
{
cout <<*index[i]<<"";
}

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!