Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
Determine the Output of this Code in C
Run this through a Linux compiler using g++ and play around with the values within the array. I have posted the solutions, but I did not run this through a compiler, so there might be errors.
#include <stdio.h>
int main(){ int x [5]; x[0] = 10; x[1] = 30; x[2] = 50; x[3] = 70; x[4] = 99; int *y = x;
printf("%d\n", *y+2); // 12 printf("%d\n", *(y+2)); // 50 printf("%d\n", x[5]); // writes random number from system memory. printf("%d\n", y); // writes random number from system memory.
}