How to dry run any c++ programs?

Aug 21, 2014 at 10:30pm
I've noticed that in order for us to understand any program is by dry running it using a pen and paper and that is much difficult. Please give me a tips on how to dry run a program. Is there a software that will dry run a program and show us how it runs? I want to have that software.
Last edited on Aug 21, 2014 at 10:34pm
Aug 21, 2014 at 10:33pm
A profiler?
Aug 21, 2014 at 10:44pm
A debugger?
Aug 21, 2014 at 10:47pm
A software that will show like this below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
for i=1
Armstrong=3;
 num=15;
Armstrong=3*3*3=27 
result=0+27=27;

for loop condition check: num is not equal to zero loop will run again

for i=2
Armstrong=5;
num=1;
Armstrong=5*5*5=125 
result=27+125=152;

for loop condition: num is not equal to zero loop will run again

for i=3
Armstrong=1;
num=0;
Armstrong=1*1*1=1; 
result=152+1=153;


for loop condition: num is EQUAL TO ZERO loop will run again

Loop will break and if else condition will be checked as or result=153 and check=153 
Aug 21, 2014 at 10:49pm
What if I see a program that is much harder to understand and how can I dry run it using pen and paper? I really need a software for that.
Last edited on Aug 21, 2014 at 10:53pm
Aug 21, 2014 at 10:55pm
I want to an expert in dry running a program.
Aug 21, 2014 at 11:08pm
I don't think anything like that exists. Debuggers are as close as it gets, and it's what everyone uses when trying to understand the flow of a program.
Last edited on Aug 21, 2014 at 11:09pm
Aug 22, 2014 at 1:10am
How do I use a debugger? Is that easy to use?
Aug 22, 2014 at 5:23am
you mean like an IDE?
Topic archived. No new replies allowed.