twitter
    Find out what I'm doing, Follow Me :)

Two Very Important Rules

The following two rules are very important when using pointers and must be thoroughly
understood.
1. A variable name with an ampersand in front of it defines the address of the variable and therefore points to the variable. You can therefore read line six as "pt1 is assigned the value of the address of "index".
2. Apointer with a "star" in front of it refers to the value of the variable pointed to by the pointer.Line nine of the program can be read as "The stored (starred) value to which the pointer "pt1"points is assigned the value 13". Now you can see why it is convenient to think of the asteriskas a star, it sort of sounds like the word store.