#include<stdio.h>#include<conio.h>void main(){ int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int *ptr; int i; clrscr(); ptr = arr; for(i=0; i<10; i++) { printf("arr[%d] = %d\t *(ptr+%d) = %d\n", i, arr[i], i, *(ptr+i)); } getch();}
No comments:
Post a Comment