Home Segments Index Top Previous Next

42: Mainline

You can combine several separate variable declarations into one, more concise variable declaration as long as each variable belongs to the same data type. In the following program fragment, for example, all three variables are declared to be integer variables in a single declaration:

main ( ) { 
  int height, width, length; 
  ... 
} 

Note the obligatory, variable-separating commas.