Rule: The comma (‘,’) operator shall not be used within variable declarations.
Example (don’t):
char * x, y; // did you want y to be a pointer or not?
Reasoning: The cost of placing each declaration on a line of its own is low. By contrast, the risk that you’ve made a mistake and the compiler or a maintainer won’t understand your intentions is high.
These rules are excerpts from the Embedded C Coding Standard book.
Tags: embedded, programming, safety, standards

As part of this rule, it may also be worth adding that in pointer declarations, the ‘*’ should appear before the variable name without a space.E.g.: char *x;
I would also like to add: Be consistent with the use of qualifiers on pointers.const char *p1;char const *p2;Some programmers prefer p1 because it keeps the pointer and type together (char and *). Some prefer p2 because it associates the const with the *.You could argue either way, but I've seen code using both declarations and I find it just a bit harder to read.Bill A.
I've always appreciated Dan Sak's instruction at a previous Embedded Systems Conference regarding "CV" variable definitions (i.e. variables that have the qualifiers "const" or "volatile").What's the difference between the following:char * p1;char const * p2;char * const p3;char const * const p4; Answer:p1 is a pointer to a charp2 is a pointer to a constant charp3 is a constant pointer to a charp4 is a constant pointer to a constant charThe trick: you read the variable definition backwards. Start with the variable name and work your way from right to left.Given that understanding, char const *p1;is preferred toconst char *p1;