P. 1
C Language Reference Manual - 5th Edition

C Language Reference Manual - 5th Edition

4.5

|Views: 8,346|Likes:
Published by ioana

More info:

Published by: ioana on May 23, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/16/2013

pdf

text

original

A cast expression preceded by a parenthesized type name causes the value of the
expression to convert to the indicated type. This construction is called a cast. Type

007–0701–150

57

6: Expressions and Operators

names are discussed in "Type Names", page 86. The syntax of a cast expression is as
follows:

cast-expression:

unary-expression

(type-name) cast-expression

The type name specifies a scalar type or void, and the operand has scalar type.
Because a cast does not yield an lvalue, the effect of qualifiers attached to the type
name is inconsequential.

When an arithmetic value is cast to a pointer, and vice versa, the appropriate number
of bits are simply copied unchanged from one type of value to the other. Be aware of
the possible truncation of pointer values in 64-bit mode compilation, when a pointer
value is converted to an (unsigned) int.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->