#include <stdio.h>    /* Biblioteca padrão de entrada e saída: teclado e tela */
#include <stdlib.h>   /* Biblioteca padrão de rotinas do C  */
#include <limits.h>   /* Limites de precisão int e char     */
#include <float.h>    /* Limites de precisão float e double */

#define CONSTANTE 10
#define VALOR_PI  3.1415926

int main(int argc, char *argv[])
{
  int    vi;
  unsigned short int vusi;
  signed   short int vsi;  
  float  vf;
  double vd;
  char   letra;
  char   texto[50];

  printf("Tipos de dados - Faixa de Valores:\n\n");

  printf("Char    => [ %d .. %d ] ou [ %d .. %d ] (Unsigned)\n",SCHAR_MIN,SCHAR_MAX,0,UCHAR_MAX);
  printf("Int     => [ %d .. %d ]\n",INT_MIN,INT_MAX);
  printf("Short   => [ %d .. %d ]\n",SHRT_MIN,SHRT_MAX);
  printf("Long    => [ %d .. %d ]\n",LONG_MIN,LONG_MAX);
  printf("Float   => [ %e .. %e ]\n",FLT_MIN,FLT_MAX);
  printf("Double  => [ %e .. %e ]\n",DBL_MIN,DBL_MAX);
  printf("\n");
  
  system("PAUSE");
  
  printf("Tamanho das variaveis em bytes...\n\n");
  printf("Int          = %d\n",sizeof(int));
  printf("Signed   Int = %d\n",sizeof(signed   int));
  printf("Unsigned Int = %d\n",sizeof(unsigned int));
  printf("Long  Int    = %d\n",sizeof(long int));
  printf("Short Int    = %d\n",sizeof(short int));
  printf("Float        = %d\n",sizeof(float));
  printf("Double       = %d\n",sizeof(double));
  printf("Long  Double = %d\n",sizeof(long double));
  printf("Char         = %d\n",sizeof(char));
  printf("\n");
  printf("Variavel vi    = %d\n",sizeof(vi));
  printf("Variavel vf    = %d\n",sizeof(vf));
  printf("Variavel vd    = %d\n",sizeof(vd));
  printf("Variavel letra = %d\n",sizeof(letra));
  printf("Variavel Texto = %d\n",sizeof(texto));

  system("PAUSE");	
  return 0;
}
