Pointer trouble !
I am having some trouble with this pointer problem ! I cannot figure out how we find the input. I don't have trouble with basic pointers, but this question is beyond me.
Here is the link to the problem: http://i40.tinypic.com/24d4xso.png
Could someone please explain to me why the output is 0112 ? Thanks :)
|I cannot figure out how we find the input.|
There is no input in the linked program.
I = 0, j = 0, k = 0.
Hence output - 0. (2nd cout)
I = 1, j = 0, k = 1.
Hence output - 1. (1st cout)
I = 2, j = 1, k = 1.
Hence output - 1. (2nd cout)
I = 3, j = 1, k = 2.
Hence output - 2. (1st cout)
Topic archived. No new replies allowed.