Theseus
alive2100@gmail.com
Search
Theseus
ApplicationMemo
How to print variable address
Source Code
#include <stdio.h>
int main(void)
{
int i = 999;
int *cool = &i;
printf("%d\n", i); // 32 bits
printf("0x%p\n", &i);
printf("%d\n", *cool);
printf("0x%p\n", &cool);
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment