Functions: Void Functions

I am studying a sample past exam paper prior to my exam and i got stuck in understanding this function question need explanation.

i really cant type out the whole code here but i had upload the code and its question in the two links below; please visit the two links and download the image file and view the code and its question.

link 1 has the code and link 2 has the question .

Thank You.

1(code)- http://www55.zippyshare.com/v/Yk1Mx2mb/file.html

2(Question)http://www55.zippyshare.com/v/YAoTDfI4/file.html

Last edited on
Hello Neman Nasawa,

I will say this in case you are not familiar with it:

PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.

i really cant type out the whole code here but i had upload the code and its question. Why not? This can give people the wrong impression. The code is short, so it should be posted here with the questions so everything is in one place.

Since this is an exam question to make you think and see if you can follow the code I would suggest first compile and run the code to see what output you get. Then in your IDE setup break points to see what the value of the variables are or you could add some "cout" statements at different places to see the values.

As you read through the program notice the first call to calc will reverse the numbers.

Hope that helps,

Andy
Topic archived. No new replies allowed.