[ create a new paste ] login | about

Link: http://codepad.org/petPfCji    [ raw code | output | fork ]

C, pasted on Jul 17:
1
2
3
4
5
6
7
8
9
10
#include<stdio.h>
    int main()
    {
        void *p;
        int a[4] = {1, 2, 3, 8};
        p = &a[3];
        int *ptr = &a[2];
        int n = p - ptr;
        printf("%d\n", n);
   }


Output:
1
2
In function 'main':
Line 8: error: invalid operands to binary -


Create a new paste based on this one


Comments: