[cs13001] questions on unusual code
Mikhail Nesterenko
mikhail at cs.kent.edu
Sun Nov 10 19:24:27 EST 2013
CSI students,
Here is something to think about for the next class. I encountered
this particular line in one of the project submissions:
int *tmp = new int[size -= 1];
It does what it is untended to do. However, it is highly unusual.
So, here are my questions:
- what does the above line do?
- why does it work?
- how can it be simplified?
Thanks,
--
Mikhail
More information about the cs13001
mailing list