Monday 20 March 2017

C in size operator

Program :

#include
void main()
{
  printf("\n size of int is: %d",sizeof(int));
  printf("\n size of float is: %d",sizeof(float));
  printf("\n size of double is: %d",sizeof(double));
  printf("\n size of char is: %d",sizeof(char));

}

Note: In borland C or Turbo C compilers size of int is 2.

Output :


No comments:

Post a Comment