main( )
{
int a = 3 ;
int *b ;
b = &a ;
printf ( "\nAddress of a = %u", &a ) ;
printf ( "\nAddress of a = %u", b ) ;
printf ( "\nAddress of b = %u", &b ) ;
printf ( "\nValue of b = %u", b ) ;
printf ( "\nValue of a = %d", a ) ;
printf ( "\nValue of a = %d", *( &a ) ) ;
printf ( "\nValue of a = %d", *b ) ;
}

OUTPUT:
Address of a = 65512
Address of a = 65512
Address of b = 65522
Value of b = 65512
Value of a = 3
Value of a = 3
Value of a = 3




0 comments to "SIMPLE PROGRAM SHOWING POINTER IN C LANGUAGE"

Post a Comment

Powered by Blogger.