fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4.  
  5. struct hello_t
  6. {
  7. int before;
  8. int array[5];
  9. };
  10.  
  11. int main() {
  12. // your code goes here
  13. struct hello_t hello;
  14. hello.array[0] = 100;
  15. struct hello_t* ptr_hello;
  16. ptr_hello = &hello;
  17. printf("ptr_hello = %X\n", ptr_hello);
  18. printf("&ptr_hello = %X\n", &ptr_hello);
  19. printf("&ptr_hello->before = %X\n", &ptr_hello->before);
  20. printf("&ptr_hello->array[0] = %X\n", &ptr_hello->array[0]);
  21.  
  22. printf("");
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
ptr_hello = BFA7CFB8
&ptr_hello = BFA7CFB4
&ptr_hello->before = BFA7CFB8
&ptr_hello->array[0] = BFA7CFBC