My C++ Quiz

The ultimate place to learn C++!

Question #76: Given the code below what will be the output to stdout?

#include <cstdio>

00 void foo(int v1, int v2, int v3, int v4)
01 {
02    printf("%d %d %d %d\n",v1,v2,v3,v4);
03 }
04
05 int main()
06 {
07    int lut[] = { 1, 2, 3, 4 };
08    int idx = 0;
09    foo(lut[idx++],lut[idx++],lut[idx++],lut[idx++]);
10    return 0;
11 }