Your code is almost correct, it just needs some slight re-arrangement.
I'd start by changing line 26 from this: print (n_ast -= 2);
to this:print (n_ast - 2);
Also, at line 22 else { isn't needed. The return at line 19 handles that.
I don't understand the question.
The compiler translates your code into executable machine instructions.
Sorry if that sounds very pedantic. What I was trying to emphasise is that the program was doing exactly what you told it to do.
Consider this code, it may give you a clue.
Note, all four functions are identical apart from the character output.