[圖解C] Example 701

// Example 701: using %p and & to access adress

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int num=110;
    char ch='a';
 
    puts("name \t value \t address");
    puts("-------------------------");
 
    // "%p" and "&" to access address
    printf("num \t %d \t %p\n", num, &num);
    printf("ch \t %c \t %p\n", ch, &ch);
 
    system("pause");
    return 0;
}