rohidas

Hi I am Rohidas lande.I have teaching in C.D.jain college of commerce Shrirampur .I have Nine year in teaching Experience to teach various programming langauge,script languages,databases like Java,C,C++,php,python,html,css,javascript,mysql,oracle.

Display the Size of the Different Datatype.

 

BACK

Question:- Write C Program to Program to Display the Size of the Different Datatype.

 Answer:-

             

             #include <stdio.h>
             int main()
     { 
                printf("int is    %2d bytes \n", sizeof(short int));
                printf("long int is  %2d bytes \n", sizeof(long int));
                printf("float is    %2d bytes \n", sizeof(float));
                printf("double is   %2d bytes \n", sizeof(double));
                printf("long double is  %2d bytes \n", sizeof(long double));
                printf("char is   %2d bytes \n", sizeof(char));
           return 0;

      } 

Post a Comment

0 Comments