Thread: C programming homework

  1. #1
    Registered User
    Join Date
    Nov 2017
    Posts
    9

    C programming homework

    Hello all, I've been tackling some C problems lately considering I'm very new to it. I hope someone can help me with this question cause I'm stuck. If someone can write the code, i would analyze it step by step and understand it myself. Thanks


    "Write a program that includes a memory introspection functionview stack frame(), printing out the stack frame of caller functions.For simplicity’s sake, you may assume that all variablesinside the callers’ stack frames are all of the same type, althoughtheir number may vary. The function displays output organized intwo columns, the first displaying addresses of variables while thesecond displays their corresponding values. Symbolic identifiersdo not feature."

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,316
    Well do you know anything about how stack frames are organised?

    Do you know what a frame pointer is (that's a good google term btw)?

    Have you researched C calling conventions?

    > If someone can write the code, i would analyze it step by step and understand it myself.
    But not anywhere near as much as writing it yourself.

    Which machine are you targetting?
    Which compiler are you using?
    Using the GNU Compiler Collection (GCC): Return Address
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,335
    This hardly seems like the kind of homework given to a completely new programmer so why are you asking us to write it instead of writing it yourself and asking about areas where you get stuck?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Programming homework help needed
    By bowmanx4587 in forum C Programming
    Replies: 1
    Last Post: 12-06-2015, 09:34 PM
  2. Replies: 18
    Last Post: 03-23-2015, 05:56 PM
  3. new to c programming, Homework help
    By esardinha08 in forum C Programming
    Replies: 10
    Last Post: 01-01-2012, 10:42 PM
  4. What should be the Homework for game Programming?
    By mistu4u in forum Game Programming
    Replies: 7
    Last Post: 06-16-2011, 12:36 AM

Tags for this Thread