[ create a new paste ] login | about

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

C, pasted on Jul 20:
1
2
3
4
5
6
7
8
#include<stdio.h>
int main(){
 int a[] = {-2, -5};
 int *p = a;
 int j = *p++;  // first assigns -2 then increments ptr 
 printf("j: %d \n*p: %d\n", j, *p);
 return 1;
}


Output:
1
2
j: -2 
*p: -5


Create a new paste based on this one


Comments: