The *

I am seeing the '*' character used for things not related to math. Maybe it has always been that way, just don't remember seeing it used like this;

char *p = sz;

Can someone explain what the * is doing? I think it means something like "any" or "unknown". but a clarification would be good.

char* p;  
char *q;

These lines declare a variable called p, which does not contain a character, but rather the address in memory of a character. This is called a "char pointer." Often, the pointer is used to point to a whole string of chars at once. (The difference between these two lines is just style; I prefer the former style, but many prefer the latter.)

The sz you refer is common way to say "a string ending in a zero character," the most common form of string. When you use double-quotes in C, you are making a string of characters ending in a zero character. The pointer to the first character is the actual value used, so it has to be kept in a char pointer variable.

char* p = "ABC";  // point to a string of chars 0x41 0x42 0x43 0x00

In an expression, you can "follow" the pointer to see what's at that address. Including *p in an expression means to look at the char at the address described by p, not the value of p itself. After the line above, *p is 'A' and *(p+1) is 'B'.

Confusing at first. Time to go look up "pointers" in a good book on C.