0
What happens when multiple values are cascaded with cout?
The answer is not coming correct as we predict!!
6 Respostas
+ 1
in that case, it should print out
5,3
such that y-- is postfix so it will happen after ttue print. the next time the variable is called it would be 1 less. the next --y immediately reduces it because it is prefix
so it does
5 waits after
4 -> 3 right away
hope this helps!!
0
cascaded? could you elaborate... there are Many ways to manipulate and use the cout in c++
0
using the increament and decreament operators in single line.
For example:
cout<<y--<<", "<<--y;
say y = 5;
then what is the output?
0
Try it yourself the answer is not coming that!
0
are you trying it in Code Playground? pretty sure their shits busted bc I just wrote x = 5; cout x++ and they told me it was 4. I've overloaded the x++ and ++x operators, Many times. trust me
5 , 3 is the output.
0
Yes, I am trying in Code playground but output shows: 4,3.
Is something wrong with sololearn?
Does the output differ on Computer and app?