I've got a strange C++ code:
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int tab[][2] = { {1,2}, {3,4}, {5,6} };
int *a = tab[0];
printf( "%d %d %d", *a++, *a++, *a++ );
return 0;
}
And I've got a question: why the output is
3 2 1
.
Could you explain this pointer arithmetics? Thanks.