c - Printing the return address using format string -


i required print out return address stored in stack function? format supposed follow print is

void function()  {       int *retptr = 0;       printf("return address 0x%08x\n",                  (unsigned int *)(&retptr+return_addr_offset));       /*code goes here*/  } 

can please help! not supposed using inbuilt function. how can this?

this smells homework me if can't use built-in functions.

in case, there's nothing magic being pointer; need print out hex number.

without knowing functions if allowed use, it's kind of hard help. need work out 8 hex digits output them.


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

Java - Returning an array from a method to main -