Programa En C Operador Sizeof

Páginas: 2 (307 palabras) Publicado: 4 de junio de 2012
#include
#include
#include
main()
{
char c;
short s;
int i;
long l;
float f;
double d;
long double ld;
unsigned int ui;
unsigned long ul;
unsigned short us;
unsignedchar uc;

printf( "\n sizeof c = %d\tsizeof(char) = %d byte"
"\n sizeof s = %d\tsizeof(short) = %d bytes"
"\n sizeof i = %d\tsizeof(int) = %d bytes"
"\n sizeof l = %d\tsizeof(long)= %d bytes"
"\n sizeof f = %d\tsizeof(float) = %d bytes"
"\n sizeof d = %d\tsizeof(double) = %d bytes"
"\n sizeof ld = %d\tsizeof(long double) = %d bytes"
"\n sizeof ui =%d\tsizeof(unsigned int) = %d bytes"
"\n sizeof ul = %d\tsizeof(unsigned long) = %d bytes"
"\n sizeof us = %d\tsizeof(unsigned short) = %d bytes"
"\n sizeof uc = %d\tsizeof(unsigned char) =%d byte",
sizeof c, sizeof ( char ), sizeof s, sizeof (short), sizeof i,
sizeof ( int ) , sizeof l, sizeof( long ), sizeof f,
sizeof( float ), sizeof d, sizeof( double ), sizeof ld,sizeof( long double ), sizeof ui, sizeof (unsigned int), sizeof ul,
sizeof (unsigned long), sizeof us, sizeof(unsigned short), sizeof uc,
sizeof (unsigned char));

printf("\n\n Eltamaño minimo de char es: %d",CHAR_MIN);
printf("\n El tamaño maximo de char es: %d",CHAR_MAX);
printf("\n El tamaño minimo de short es: %d",SHRT_MIN);
printf("\n El tamaño maximo deshort es: %d",SHRT_MAX);
printf("\n El tamaño minimo de int es: %d",INT_MIN);
printf("\n El tamaño maximo de int es: %d",INT_MAX);
printf("\n El tamaño minimo de long es:%d",LONG_MIN);
printf("\n El tamaño maximo de long es: %d",LONG_MAX);
printf("\n El tamaño de unsigned int es: %d",UINT_MAX);
printf("\n El tamaño de unsigned long es: %d",ULONG_MAX);printf("\n El tamaño de unsigned short es: %d",USHRT_MAX);
printf("\n El tamaño de unsigned char es: %d",UCHAR_MAX);
printf("\n El tamaño de float es: %d",FLT_RADIX);

getch();

}
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programas en c#
  • Programa c#
  • PROGRAMAR EN C
  • C++ Programas De C++
  • Programas en c++
  • programa en c++
  • Operaciones En C++
  • programas en c

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS