fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5.  
  6. double* b;
  7.  
  8. b = ( double* )malloc(sizeof(double)*5);
  9.  
  10. for(int i=0; i<5; i++)
  11. {
  12. b[i] = (double)i/10.0;
  13. }
  14.  
  15. for(int i=0; i<5; i++)
  16.  
  17. {
  18. printf("b[%d] have adless %p\n",i,(&b[i]));
  19. printf("This contents %lf\n",b[i]);
  20. }
  21.  
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
b[0] have adless 0x5644e9c65260
This contents 0.000000
b[1] have adless 0x5644e9c65268
This contents 0.100000
b[2] have adless 0x5644e9c65270
This contents 0.200000
b[3] have adless 0x5644e9c65278
This contents 0.300000
b[4] have adless 0x5644e9c65280
This contents 0.400000