#include int global1 = 300 ; //--------------------------------------------------------------------------------------------------- void swap3( int** param1 ) { *param1 = &global1 ; } //--------------------------------------------------------------------------------------------------- void swap2( int* param1 ) { *param1 = 200 ; } //--------------------------------------------------------------------------------------------------- void swap1( int param1 ) { param1 = 200 ; } //--------------------------------------------------------------------------------------------------- int main() { int x1 = 100 ; int* ptr1 ; int** doublePointer ; printf("%d\n" , x1 ); swap1( x1 ) ; printf("%d\n" , x1 ); ptr1 = &x1 ; swap2( &x1 ) ; printf("%d\n" , x1 ); //Change the value of a pointer. doublePointer = &ptr1 ; swap3( doublePointer ) ; printf("%d\n" , **doublePointer ); printf("%d\n" , *ptr1 ); return(0) ; }