#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main()
{
int *p,*table;
int size;
printf("size?\n");
scanf("%d",&size);
printf("\n");
table=(int*)malloc(size*sizeof(int));
if(table==0)
{
printf("No space");
return 0;
}
printf("\n Adress of first byte is %d\n",table);
printf("Enter values\n");
for(p=table;p<table+size;p++)
scanf("%d",p);
for(p=table+size-1;p>=table;p--)
printf("%d is stored at address %d\n",*p,p);
getch();
return 0;
}
No comments:
Post a Comment