Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <malloc.h>
  3.  
  4. int main() {
  5. int n = 4;
  6. double *array;
  7. array = (double*)malloc(n * sizeof(int));
  8. array[0] = -3.4;
  9. array[1] = 4.5;
  10. array[2] = -5.6;
  11. array[3] = 6,7;
  12. for (size_t i = 0; i < n; i++) {
  13. printf("%d ", array[i]);
  14. }
  15. free(array);
  16. int t;
  17. scanf_s("%d", &t);
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement