Application on stack

Discussion in 'C' started by hanann, Oct 11, 2009.

  1. hanann

    hanann New Member

    Joined:
    Oct 2, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    CS student
    Location:
    palestine
    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
     
  2. hanann

    hanann New Member

    Joined:
    Oct 2, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    CS student
    Location:
    palestine
    some help me?
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    What's the problem you have?
    What code have you got and where are you stuck?
     
  4. hanann

    hanann New Member

    Joined:
    Oct 2, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    CS student
    Location:
    palestine
    I have problem with convert from infix to postfix
    and i can't imagine How the output can appears like this
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     
  6. hanann

    hanann New Member

    Joined:
    Oct 2, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    CS student
    Location:
    palestine
    ok thank you!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice