ShriRam Changed status to publish July 16, 2022
#include<stdio.h> int main() { int i,arr[5]; //printf("%d\n", ptr); printf("Enter Values \n"); for(i=0;i<5;i++) scanf("%d",arr+i); printf("Values are \n"); for(i=0;i<5;i++) printf("%d\n", *(arr+i)); } Or #include int main() { int i,arr[5] = { 1, 2, 3, 4, 5 }; int *ptr = arr; printf("%d\n", ptr); for(i=0;i<5;i++) printf("%d\n", *(ptr+i)); }
ShriRam Changed status to publish July 16, 2022