O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

New Places for Old Keywords

C99 allows you to place the type qualifiers and the storage class qualifier static inside the initial brackets of a formal parameter in a function prototype and function header. In the case of the type qualifiers, this provides an alternative syntax for an existing capability. For example, here is a declaration with the older syntax:

void ofmouth(int * const a1, int * restrict a2, int n);  // older style

It says that a1 is a const pointer to int, which, recall, means that the pointer is constant, not the data to which it points. It also indicates that a2 is a restricted pointer, as described in the preceding section. The new and equivalent syntax is

 void ofmouth(int a1[const], int a2[restrict], int n); // allowed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required