0

What is the output of this code?

#include <iostream> int main() { std::cout << (1 << 1 << 1); return 0; }

13th Jul 2016, 3:38 PM
this->getName()
2 Answers
+ 3
solve the expression from right to left 0001 << 0001 = 0010 = 2 0001 << 2 = 0100 = 4
13th Jul 2016, 3:53 PM
Vedant Patadia
Vedant Patadia - avatar
+ 1
4
13th Jul 2016, 3:51 PM
Vedant Patadia
Vedant Patadia - avatar