HPlogo HP C/HP-UX Reference Manual: Workstations and Servers > Chapter 2 Lexical Elements

Punctuators

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

A punctuator is a symbol that is necessary for the syntax of the C language, but performs no run-time operation on data and produces no run-time result.

Syntax

punctuator ::=  One selected from:
[ ] ( ) { } * , : = ; # ...

Description

Some punctuators are the same characters as operators. They are distinguished through the context of their use.

Example

#include <stdio.h> /* # marks the processing directive "include"*/
main() /* ( and ) mark the beginning and end of
argument list */

{ /* { marks the beginning of a block */
printf("\nHello world\n"); /* ; marks the end of a statement */

} /* } marks the end of a block */