File: test_em_pointer_arit

package info (click to toggle)
clif 0.93-9
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 4,228 kB
  • ctags: 3,284
  • sloc: ansic: 31,464; yacc: 5,067; lex: 819; makefile: 383; sh: 48
file content (20 lines) | stat: -rw-r--r-- 216 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int *p, c[5];

int
main ()
{
  int i;
  for (i = 0; i < 5; i++)
    c[i] = i;
  p = &c[3];
  printf ("%d %d %d %d %d\n",
	  *(p / 3),
	  *(p * 2),
	  *(p << 1),
	  *-p,
	  *(p + 1));
  p &= 2;
  
  return 0;
}
exit;