HP C A.06.05 Reference Manual

Expressions and Operators
Pointer Operators (*, ->, &)
Chapter 5 125
printf("%c", c1);
printf("\n");
/* Print same name indirectly through an array of pointers. */
while (c2 = *(pstr[which_name]++))
printf("%c", c2);
/* We could also have used the following statement instead of
* the two previous ones: printf("%s", pstr[which_name]);
*/
printf("\n");
}
If you execute this program, you get the following output:
Which name do you want to retrieve?
Enter 0 for the first name,
1 for the second name, etc. -- 1
Sandi
Sandi