So I am going over some cout capabilities, and I saw this example:
and it outputs:
123
43
32
65536
I understand how it outputs 123 obviously, but how does it output the rest? How does using () in cout work?
#include <iostream>
using namespace std ;
void prob1(int i , int j , int k ){
cout << i << j << k << endl ;
cout << (i << j ) << k << endl ;
cout << (( i << j) << k) << endl ;
cout << (i << (j << k )) << endl ;
}
int main() {
prob1(1,2,3) ;
system("pause");
return 0 ;
}
and it outputs:
123
43
32
65536
I understand how it outputs 123 obviously, but how does it output the rest? How does using () in cout work?