Image

Programs - C Language - Pointer

Program:

#include<stdio.h>
#include<conio.h>
void main(){
int a[5]={2,5,4,1,6},i;
 clrscr();

for(i=0;i<5;i++){
  printf("Value of a[%d] = %d \n",i,a[i]);
  printf("Address of a[%d] = %u\n",i,&a[i]);
 }

 getch();
}