Wednesday

Sizeof operator


Sizeof operator


Sizeof operator calculate the size of data i.e. how many bit a specific data having.

Syntax of sizeof operator :


printf("<format string>",sizeof<(data type variable)>);


 /*Program to sizeof operator*/
 #include<stdio.h>
 #include<conio.h>
 void main()
 {
  int x=10;
  clrscr();
  printf("\nSize of  x is %d",sizeof(x));
  getch();
 }


  Output of above program :

  Size of x is 2



Kindly Bookmark this Post using your favorite Bookmarking service:
Technorati Digg This Stumble Stumble Facebook Twitter
YOUR ADSENSE CODE GOES HERE

0 comments:

Post a Comment

Dont Forget for Commets

 

| C programing tutorials © 2009. All Rights Reserved | Template Style by My Blogger Tricks .com | Design by Brian Gardner | Back To Top |