Lecture 2 - Slide 7 : 29 |
unsigned int i = 7, j[3], *k = &i; char ch0; char* ch1, ch2; // Misleading notation but OK. Only ch1 is a char pointer! char *ch3, ch4; // Prefer this variant! 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 a lot in these slides and notes