Punctuation

A punctuator is a character in the 'C' source alphabet which has syntactic and semantic significance but does not specify an operation to be performed that yields a value. Depending on context, the same symbol may also represent an operator or part of an operator.

The punctuators are:

	[ ] ( ) { } , : ; # ...",  /* what about: .. */

The following punctuators are described in detail under Operators under the Expressions page.

	[ ] ( ) ,
The following punctuators are described in detail under the Statement Menu:
	{ } :  ;

The following is described in detail under the Preprocessor section:

	#

The ellipses, three periods in a row (without white space):

	...

are an advanced feature used only in function prototypes and definitions, where they mean: that the number and type of parameters is variable. This occurs in printf() and scanf(), for example.

There is also a double period punctuator:

	..

supposed to be used in switch statements to give a range of values for a case arm, but not all compilers implement this.

	switch(x) {
		case 0: s1; break;
		case 1..4: s2; break; /* 1<=x<=4 */
		default: s3; break;
	}

© 1991-2008 Prem Sobel. All Rights Reserved.