C examples for Pointer:Pointer Variable
Declare and initialize an int variable
#include <stdio.h> int main( void ) { int var = 1;//w w w . j a v a 2s. c o m int *ptr; ptr = &var; printf("\nDirect access, var = %d", var); printf("\nIndirect access, var = %d", *ptr); printf("\n\nThe address of var = %d", &var); printf("\nThe address of var = %d\n", ptr); return 0; }