Company: Qualcomm
Difficulty: hard
What will be the output of the program given below? #include <stdio.h> int k = 12; int time(unsigned int *ptr) { *ptr++; *ptr += k++ ^ 2; return *ptr; } int main() { static int i, j = 0x05; j = j << 2 && ++i; for (i = 3; i >= -1; i--) { printf("%d ", time(&j)); } return 0; } (inferred - the screenshot does not state a platform, so assume a straightforward unoptimised build in which int is 32 bits, the two statics i and j occupy adjacent slots in that declaration order, and the slot that ptr ends up addressing starts at zero and keeps its value between calls.)