Jul 11

C  provides  a compiler time unary operator called sizeof operator that can be used to compute the size of any object.

Expressions:

sizeof  object     and sizeof (typename)

This expression results in unsigned integer value equal to the size of specified object or type,in bytes.

Example

sizeof(char) = 1 byte

sizeof(int) = 2 bytes

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • LinkedIn
  • MySpace
  • Reddit
  • RSS
  • Twitter

written by Shweta