What do >> and
I notice that I can do things like 2 << 5 to get 64 and 1000 >> 2 to get 250. Also I can use >> in print: print >>obj, “Hello world” What is happening here? 10 Answers 10
I notice that I can do things like 2 << 5 to get 64 and 1000 >> 2 to get 250. Also I can use >> in print: print >>obj, “Hello world” What is happening here? 10 Answers 10
I’m reading STL source code and I have no idea what && address operator is supposed to do. Here is a code example from stl_vector.h: vector& operator=(vector&& __x) // <– Note double ampersands here { // NB: DR 675. this->clear(); this->swap(__x); return *this; } Does “Address of Address” make any sense? Why does it have … Read more
This question already has answers here: PHP ternary operator vs null coalescing operator (14 answers) Closed 3 years ago. I was diving into Symfony framework (version 4) code and found this piece of code: $env = $_SERVER[‘APP_ENV’] ?? ‘dev’; I’m not sure what this actually does but I imagine that it expands to something like: … Read more
Consider this code: “int s = 20; int t = s++ + –s;”. What are the values of s and t?