Re: sizeof(x)



Ioannis Vranos wrote:
Ian Collins wrote:
Ioannis Vranos wrote:
Ioannis Vranos wrote:
I first saw that only sizeof x is valid at the pdf hosted at
http://cprog.tomsweb.net.
More specifically the above writes:

"sizeof Returns size of operand in bytes; two forms:
1) sizeof(type)
2) sizeof expression"


Did you read what Harald said: "(x) is a perfectly valid expression"?

... right. However sizeofx doesn't compile and if (x) was considered an
expression it should be sizeof (x), and sizeof(x) shouldn't compile.

Try sizeof(((((((((((((((((((((x)))))))))))))))))))))
and perhaps the answer will come to you.

--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: sizeof a + b and strange value
    ... >> The sizeof operator has two forms ... there is no "type_cast" in a sizeof expression. ... parentheses in a cast such as expr. ...
    (comp.lang.c)
  • Re: sizeof a + b and strange value
    ... > sizeof ... > The 'something' in both forms is a single data item or data type ... A type_cast *must* have parentheses, an expression may or may not have ...
    (comp.lang.c)
  • Re: sizeof(x)
    ... "sizeof Returns size of operand in bytes; ... sizeof expression" ... expression it should be sizeof, and sizeofshouldn't compile. ...
    (comp.lang.c)
  • Re: sizeof(x)
    ... "sizeof Returns size of operand in bytes; ... sizeof expression" ... expression it should be sizeof, and sizeofshouldn't compile. ...
    (comp.lang.c)
  • Re: sizeof(x)
    ... "sizeof Returns size of operand in bytes; ... sizeof expression" ... expression it should be sizeof, and sizeofshouldn't compile. ...
    (comp.lang.c)