Discussion: Superhero’s Secret Identity
Execute the code to understand the output and gain insights into array and pointer access.
We'll cover the following...
Run the code
Now, it's time to execute the code and observe the output.
Press + to interact
#include <stdio.h>#define SIZE 5int main(){int values[SIZE] = {2, 3, 5, 8, 13};int *v, x;/* initialize the pointer */v = values;for( x=0; x<SIZE; x++ ) {printf("%2d = %2d\n",values[x],*(v+x));}return(0);}
Understanding the output
The code uses both ...