/*------------------------------------------------------------*/ /* Program chapter6_1 */ /* */ /* This program demonstrates the relationship between */ /* variables and addresses. */ #include int main(void) { /* Declare and initialize variables. */ int a=1, b=2; /* Print the contents and addresses of a and b. */ printf("a = %d; address of a = %u \n",a,(unsigned int)&a); printf("b = %d; address of b = %u \n",b,(unsigned int)&b); /* Exit program. */ return 0; } /*------------------------------------------------------------*/