/***************************************************************/ /* Prof. Dr. Carsten Vogt */ /* FH Koeln, Fak. 07 / Nachrichtentechnik */ /* http://www.nt.fh-koeln.de/vogt */ /* */ /* Loesung der Uebungsaufgabe Kapitel 4, Nr. 1 */ /* aus "C fuer Java-Programmierer", Hanser-Verlag */ /***************************************************************/ #include int main(void) { printf("short: %d Bytes\n",sizeof(short)); printf("int: %d Bytes\n",sizeof(int)); printf("long: %d Bytes\n",sizeof(long)); printf("float: %d Bytes\n",sizeof(float)); printf("double: %d Bytes\n",sizeof(double)); printf("long double: %d Bytes\n",sizeof(long double)); printf("char: %d Byte\n\n",sizeof(char)); printf("unsigned char: %d Byte\n",sizeof(unsigned char)); printf("unsigned short: %d Bytes\n",sizeof(unsigned short)); printf("unsigned int: %d Bytes\n",sizeof(unsigned int)); printf("unsigned long: %d Bytes\n",sizeof(unsigned long)); return 0; }