Sie sind auf Seite 1von 1

/*-----------------------------------------------------*/

/* Program chapter6_1
*/
/*
*/
/*This program demonstrates the relationship between */
/*variables and addresses
*/
#include <stdio.h>
int main(void) {
/* Declare variables */
int a=1, b=2, *ptr_a=&a, *ptr_b=&b;
/*Print the contents and addresses */
printf("Value of a: %i, address of a: %u \n", a, ptr_a);
printf("Value of b: %i, address of b: %u \n", b, ptr_b);
/*Exit program */
return 0;
}
/*------------------------------------------------------*/

Das könnte Ihnen auch gefallen