C multiple single line declarations
问题 What happens when I declare say multiple variables on a single line? e.g. int x, y, z; All are ints. The question is what are y and z in the following statement? int* x, y, z; Are they all int pointers? 回答1: Only x is a pointer to int; y and z are regular ints. This is one aspect of C declaration syntax that trips some people up. C uses the concept of a declarator , which introduces the name of the thing being declared along with additional type information not provided by the type specifier