Showing posts with label Subtraction using pointer in C. Show all posts
Showing posts with label Subtraction using pointer in C. Show all posts

Monday, September 12, 2011

subtraction of using pointer

//subtraction of one pointer from another

#include<stdio.h>
#include<conio.h>
main()
{
    int a[]={10,20,30,45,67,56,74};
    int *i,*j;
    clrscr();
    i=&a[1];
    j=&a[5];
    printf("\n %d %d",j-i,*j-*i);
    getch();
    }

Popular 5 Posts Last 7 days