C Program to Display the Equivalent Memory Addresses for the given values using Array

SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
 int a[10],i,*p;
 clrscr();
 printf("\nEnter 10 Nombers:");

 for(i=0;i<10;i++)
  {
   scanf("%d",&a[i]);
  }
 p=&a[0];
 printf("\nVALUE\tADDRESS");
 for(i=1;i<=10;i++)
  {
   printf("\n%d\t%d",*p,p);
   p++; /* or  p=&a[i]; */
  }
 getch();
}
Previous
Next Post »

If you still didn't find what you're looking for, you can search this website below: