My C Quiz

The ultimate place to learn C!

Question #24: What gets printed?

01 #include <stdio.h>
02
03 int main()
04 {
05    int ints[] = { 0, 1, 2, 3 };
06    int* i1 = ints + 1;
07    int* i2 = ints + 2;
08    int a = ++*i1 + *i2++;
09    int b = *++i1 + *i2--;
10    printf("%d#%d", a, b);
11    return 0;
12 }