What does the following program print? #include <stdio.h> void main() { float z = 7.2; int i = (int)z; int j = *((int*)(&z)); printf("%d\n%d\n",i,j); }
It was a good question to ask to see if people understood pointers, casting, and C/C++, but it was a little C/C++ specific.