[ create a new paste ] login | about

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

C, pasted on Nov 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<stdio.h>
int main()
{
int *p;
int a = 100;
p=&a;
printf("%p",p++);
printf("%p",++p);
printf("%p",++*p);
printf("%p",++(*p));
printf("%p",++*(p));
printf("%p",*p++);
printf("%p",(*p)++);
printf("%p",*(p)++);
printf("%p",*++p); 
printf("%p",*(++p)); 
}


Output:
1
Segmentation fault


Create a new paste based on this one


Comments: