Monday, March 20, 2023

size of integer ,float,character,double data type in c

 //size of integer ,float,character,double data  type

#include <stdio.h>
int main (){
    int i;
    char c ;
    float f ;
    double d ;
    printf ("size of integer is :%ld byte\n ",sizeof (i));
     printf ("size of charecter is :%ld byte\n ",sizeof (c));
      printf ("size of float  is :%ld byte \n",sizeof (f));
       printf ("size of double is :%ld byte\n ",sizeof (d));
       return 0;
}

output output output output output
size of integer is :4 byte size of charecter is :1 byte size of float is :4 byte size of double is :8 byte

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...