Posts by Sawyer • 1 point
1 post
-
-1
votes1
answer25
viewsQ: Read and write multipas variaves with only one pointer
I was successful in doing task similar to the given code: int *ptr[5], i; for(i = 0; i < 5; i++){ ptr[i] = (int *)malloc(1 * sizeof(int)); } for(i = 0; i < 5; i++){ scanf("%d", ptr[i]); }…