fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. int i;
  6. double *b;
  7. b = (double*)malloc(sizeof(double)*5);
  8. for(i = 0; i < 5; i++){
  9. b[i] = i / 10.0;
  10. }
  11. for(i = 0; i < 5; i++){
  12. printf("%lf\n", b[i]);
  13. }
  14. }
  15.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
0.000000
0.100000
0.200000
0.300000
0.400000