Keyword an d Function - 图1Keyword an d Function

Reference

These are the 46 C++ standard keywords:

aut o

doubl e

new *

swi t ch

asm*

el se

operat or *

t empl at e

break

enum

pr i vat e *

t hi s *

case

ext ern

pr ot ect ed

t ypedef

cat ch *

f l oat

publ i c *

uni on

char

f or

regi st er

unsi gned

cl ass *

f r i end *

ret urn

vi r t ual *

const

got o

shor t

voi d

cont i nue

i f

si gned

vol at i l e

def aul t del et e *

i nl i ne *

i nt

si zeof

st at i c

whi l e

do

l ong

st ruct

* These keywords are specific to C++. All others exist in both C and C++.

Appendix E ♦ Keyword and Function Reference

The following are the built-in function prototypes, listed by their header files. The prototypes describe the parameter data types that each function requires.

stdio.h

i nt f cl ose( FI LE * st r eam) ; i nt f eof ( FI LE * st r eam) ;

i nt f err or( FI LE * st r eam) ; i nt ff l ush( FI LE * st r eam) ; i nt f get c( FI LE * st r eam) ;

char * f get s( char * , i nt , FI LE * st r eam) ;

FI LE * f open( const char * f il ename, const char * mode) ; i nt f pr i ntf ( FI LE * st r eam, const char * f ormat , ... ) ;

i nt f put c( i nt , FI LE * st r eam) ;

i nt f put s( const char * , FI LE * st r eam) ;

si ze_t f r ead( voi d * , si ze_t , si ze_t , FI LE * st r eam) ; i nt f scanf ( FI LE * st r eam, const char * f ormat , ... ) ;

i nt f seek( FI LE * st r eam, l ong off set , i nt or i gi n) ;

si ze_t f wr i t e( const voi d * , si ze_t , si ze_t , FI LE * st r eam) ; i nt get c( FI LE * st r eam) ;

i nt get char( voi d) ; char * get s( char * ) ;

voi d perr or( const char * ) ;

i nt put c( i nt , FI LE * st r eam) ; i nt put char( i nt ) ;

i nt put s( const char * ) ;

i nt r emove( const char * f il ename) ; voi d r ewi nd( FI LE * st r eam) ;

i nt scanf ( const char * f ormat , ... ) ;

ctype.h

i nt i sal num( unsi gned char) ; i nt asal pha( unsi gned char) ; i nt i scnt r l ( unsi gned char) ; i nt i sdi gi t ( unsi gned char) ; i nt i sgr aph( unsi gned char) ; i nt i sl ower( unsi gned char) ;

EXAMPLE

i nt i spr i nt ( unsi gned char) ; i nt i spunct ( unsi gned char) ; i nt i sspace( unsi gned char) ; i nt i supper( unsi gned char) ;

i nt i sxdi gi t ( unsi gned char) ; i nt t ol ower( i nt ) ;

i nt t oupper( i nt ) ;

string.h

char * st r cat ( char * , char * ) ; i nt st r cmp( char * , char * ) ;

Keyword an d Function - 图2i nt st r cpy( char * , char * ) ; si ze_t st r l en( char * ) ;

math.h

doubl e ceil ( doubl e) ; doubl e cos( doubl e) ; doubl e exp( doubl e) ; doubl e f abs( doubl e) ; doubl e f l oor( doubl e) ;

doubl e f mod( doubl e, doubl e) ; doubl e l og( doubl e) ;

doubl e l og10( doubl e) ;

doubl e pow( doubl e, doubl e) ; doubl e si n( doubl e) ;

doubl e sqr t ( doubl e) ; doubl e t an( doubl e) ;

stdlib.h

doubl e at of ( const char * ) ; i nt at oi ( const char * ) ;

l ong at ol ( const char * ) ; voi d exi t ( i nt ) ;

i nt r and( voi d) ;

voi d sr and( unsi gned i nt ) ;

Keyword an d Function - 图3