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 :)

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 :)

sportguy98 wrote: |
---|

I cannot figure out how we find the input. |

Iteration 1: I = 0, j = 0, k = 0. Hence output - 0. (2nd cout) Iteration 2: I = 1, j = 0, k = 1. Hence output - 1. (1st cout) Iteration 3: I = 2, j = 1, k = 1. Hence output - 1. (2nd cout) Iteration 4: I = 3, j = 1, k = 2. Hence output - 2. (1st cout) |

Topic archived. No new replies allowed.