![]() |
Output needs some explanation
Can any one give any valid reason why the output of the following program in VC++ 6.0 Compiler is
Code:
#include <iostream>00000 01010 |
Re: Output needs some explanation
Hey very interesting problem. I will try this.
|
Re: Output needs some explanation
The catch lies here
for(int i=0; i<n; i++,ptr++) If you see there is a ptr ++ and ptr is always a base pointer and so the amount of values that are incremented at\re size of base and so once it prints a and then b and so the output is 01010 |
| All times are GMT +5.5. The time now is 09:45. |