fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int n;
  6. int a[5];
  7. int *p;
  8.  
  9. a[2] = 1024;
  10. p = &n;
  11. /*
  12.   * write your line of code here...
  13.   * Remember:
  14.   * - you are not allowed to use a
  15.   * - you are not allowed to modify p
  16.   * - only one statement
  17.   * - you are not allowed to code anything else than this line of code
  18.   */
  19. p[3] = 98;
  20.  
  21. printf("size int: %zu\n", sizeof(int));
  22. printf("n: %p\n", (void*)&n);
  23. printf("a: %p\n", (void*)a);
  24. /* ...so that this prints 98\n */
  25. printf("a[2] = %d\n", a[2]);
  26. return (0);
  27. }
Success #stdin #stdout 0s 5520KB
stdin
Standard input is empty
stdout
size int: 4
n: 0x7ffd91a275ec
a: 0x7ffd91a275f0
a[2] = 98