Bu program int, float, double ve char tipinde 4 değişken bildirir. Ardından, her değişkenin boyutu sizeof operatörü kullanılarak değerlendirilir.
C Kodu:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#include <stdio.h> int main() { int integerType; float floatType; double doubleType; char charType; printf("int: %ld byte\n",sizeof(integerType)); printf("float: %ld byte\n",sizeof(floatType)); printf("double: %ld byte\n",sizeof(doubleType)); printf("char: %ld byte\n",sizeof(charType)); return 0; } |
Çıktı:
Yorum Yap