20 Mayıs 2020 Çarşamba

C programlama veri tiplerin bellek boyutu

C programlama veri tiplerin bellek boyutu gösteren kod


#include<stdio.h>
#include<locale.h>
#include<limits.h>
#include<float.h>
#include<stdlib.h>
int main()
{
setlocale(LC_ALL,"");
printf( "\nTIP\t\t  BOYUT\t\t MIN\t \tMAX\n" );
printf("==============================================================\n");
printf( "char\t\t: %d byte(s)\t%d\t\t%d\n", sizeof(char),CHAR_MIN,CHAR_MAX );
printf( "short\t\t: %d byte(s)\t%d\t\t%d\n", sizeof(short), SHRT_MIN, SHRT_MAX );
printf( "int\t\t: %d byte(s)\t%d\t%d\n", sizeof(int), INT_MIN, INT_MAX );
printf( "unsigned int\t: %d byte(s)\t\t\t%u\n",sizeof(unsigned),UINT_MAX );
printf( "long\t\t: %d byte(s)\t%ld\t%ld\n", sizeof(long), LONG_MIN, LONG_MAX );
printf( "float\t\t: %d byte(s)\t%e\t%e\n", sizeof(float), FLT_MIN, FLT_MAX );
printf( "double\t\t: %d byte(s)\t%e\t%e\n\n", sizeof(double), DBL_MIN, DBL_MAX );
getchar();
return 0;
}


Hiç yorum yok:

Yorum Gönder

Her yorum bilgidir. Araştırmaya devam...