Lecture overview -- Keyboard shortcut: 'u'  Previous page: The structure of a declaration -- Keyboard shortcut: 'p'  Next page: Declarations as statements - declarations in conditions -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Basic facilities - slide 7 : 42

Declaring several names together
Several comma-separated declarators - with associated initializers - may share the same base-type and specifier
  unsigned int i = 7,  j[3],  *k = &i;
  const double d = 5.7,  pi = 3.14159,  &dr = d;
  char *str[4],  ch = 'a';
  extern short int ei;
  bool is_even(int a), 
       is_odd(int a);
  Point p1(1,2), 
        p2;
  Pair q1 = {3,4}, 
       q2 = {5,6};

"Such constructs makes a program less readable and should be avoided"

Nevertheless, I use multiple name declarations frequently in these slides and notes