Answer the question
In order to leave comments, you need to log in
How to show an address in memory?
Good afternoon!
Not long ago I learned that through printf(“%p”, &var);
You can see exactly where the variable lies.
The question is, how can I do the same without using the printf
?
Ps For witty commentators, I’ll explain, the problem is not how and where to output (at least to paper through a printer), but how to get an address in memory that can be printed ...
I don’t need any ready-made functions. And infa from debuggers too. Roughly speaking, I want to do this:
char *moya_func(void *ptr);
int main(void)
{
void *ptr;
napechatat_v_printer_adres(moya_func(&ptr));
return 0;
}
Answer the question
In order to leave comments, you need to log in
You can use any other console output function (conio, system api). But it will be the same.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question