[ create a new paste ] login | about

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

C, pasted on Apr 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
int main() {
  char const *p = "abcdef";
  char * const q = "uvwxyz";
  char const * const r = "hijklmn";
  p++;
  q++;
  r++;
  (*p)++;
  (*q)++;
  (*r)++;
  return 0;
}
/* end */


Output:
1
2
3
4
5
In function 'main':
Line 6: error: increment of read-only variable 'q'
Line 7: error: increment of read-only variable 'r'
Line 8: error: increment of read-only location
Line 10: error: increment of read-only location


Create a new paste based on this one


Comments: