119. Program to calculate number of elements that can be stored between two pointer locations.

 

 #include<stdio.h>

char *cp1=(char *)116,*cp2=(char *)100;

int *ip1=(int *)116,*ip2=(int *)100;

void main()

{

        printf("%ld\n",cp1-cp2);

        printf("%ld\n",ip1-ip2);

}

Comments