Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Application on stack (http://www.go4expert.com/forums/application-on-stack-t19741/)

hanann 11Oct2009 21:06

Application on stack
 
I have big problem with Application on stack

and i will take exam soon

i have Q.

write a program that translates C_link assignment statement to an assembly like code
the program should read assignment statement from a text file and display the output on screen :



example:
A=b+c-d;


the output
add b c T1
sub T1 d T2
move T2 A

and should give us the result

hanann 13Oct2009 21:56

Re: Application on stack
 
some help me?

xpi0t0s 13Oct2009 22:02

Re: Application on stack
 
What's the problem you have?
What code have you got and where are you stuck?

hanann 13Oct2009 22:30

Re: Application on stack
 
I have problem with convert from infix to postfix
and i can't imagine How the output can appears like this

xpi0t0s 14Oct2009 02:52

Re: Application on stack
 
How does converting infix to postfix help solve the problem?
What is a "C_link assignment statement"?
Have you tried looking through your course notes for ideas?

You'll have to give more specific details of the exact problem you're trying to solve. Remember, we're not on your course (so don't share the context in which your comments probably have a fairly obvious meaning) and we can't read your mind.

I already asked if you've made a start on the code. As you're approaching the exam then presumably you've already solved some programming problems, so you should be able to form the basic outline of the code. For instance, have you determined what input the program will take, how it processes that input and what output it gives, if only in outline form at this time?

Maybe it would be helpful if you posted the entire assignment description in full, rather than giving a potted form of what you think it might say.

hanann 14Oct2009 17:27

Re: Application on stack
 
ok thank you!


All times are GMT +5.5. The time now is 01:02.