Answer the question
In order to leave comments, you need to log in
How to display the address of an object in C?
Good afternoon!
I'm trying to display the address of an object:
#include <stdio.h>
int main(void)
{
int i = 034534;
char h = 'h';
printf ("i=%d, &i=%n \n", i, &i);
printf ("h=%c, &i=%p \n", h, &h);
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question