Write a program that uses pointers to set each element of an array to zero
Answers
Answered by
10
Answer:
While using pointers with array, the data type of the pointer must match with the data type of the array
Answered by
3
Answer:
include <stdio.h>
int main() {
int data[5];
printf("Enter elements: ");
for (int i = 0; i < 5; ++i)
scanf("%d", data + i);
printf("You entered: \n");
for (int i = 0; i < 5; ++i)
printf("%d\n", *(data + i));
return 0;
}
Explanation:
hope it helps mark me as branliest
Similar questions