/* What is a pointer */ #include int main() { int x1 ; int* ptr1 ; x1 = 100 ; printf("x1 value is %d\n" , x1 ); ptr1 = &x1 ; printf("%p \n" , ptr1 ); *ptr1 = 200 ; printf("x1 value is %d\n" , x1 ); //A pointer has to be of some type. If we increment by 1 then then //the pointer address is incremented by 4 ptr1 = ptr1 + 1 ; printf("%p\n" , ptr1 ); //Not a legal memory location //ptr1 = ptr1 + 1000000 ; //*ptr1 = 300 ; }