// Program of pointer
#include
#include
void main()
{clrscr();
int *ptr1,*ptr2;
static int arr[5]={11,22,33,44,55};
ptr1=&arr[1];
ptr2=&arr[4];
if(ptr1
printf("Address %d is less than address %d\n", ptr1,ptr2);
else
printf("Address of %d is greater or equal to address %d\n", ptr1,ptr2);
getch();
}
Algorithm
· Start
· Declare *ptr1,*ptr2 as integer
· static int arr[5]={11,22,33,44,55}
· ptr1=&arr[1]
· ptr2=&arr[4]
· if(ptr1
· Read("Address of ptr1 is less than address of ptr2)
· else
· Read("Address of ptr1 is greater or equal to address of ptr2”)
· Stop
c programming example
ReplyDeletec code for getting the disk status