+ 4

consider this one its one good tricky code i encountered :

#include <iostream> using namespace std; int main() { cout << cout; return 0;} any guesses what would be the output ?

2nd Jan 2017, 4:51 PM
sadiya zainab
sadiya zainab - avatar
5 ответов
+ 5
This outputs the address of 'cout' from std library. You can't guess this output using a human brain unless you memorize each and every address of the std library. But if you test it in an IDE, it will be `0x467f84`
2nd Jan 2017, 5:29 PM
Wen Qin
Wen Qin - avatar
+ 4
how can anyone explain?
2nd Jan 2017, 5:18 PM
sadiya zainab
sadiya zainab - avatar
+ 1
0x467f84
2nd Jan 2017, 4:55 PM
Naveen Kumar
Naveen Kumar - avatar
+ 1
0x467f84
2nd Jan 2017, 4:56 PM
Kaleb Cole-Wood
Kaleb Cole-Wood - avatar