如何更改此代码,在编译时不会发出无符号警告

时间:2015-01-13 15:53:56

标签: c warnings unsigned

当我尝试编译它时,该程序会发出警告,表示长unsigned int:

#include <stdio.h>

int main()
{

    int a;
    float b;
    double c;
    char d;

    printf("Size of int=%d bytes\n",sizeof(a));
    printf("Size of float=%d bytes\n",sizeof(b));
    printf("Size of double=%d bytes\n",sizeof(c));
    printf("Size of char=%d byte\n",sizeof(d));

    return 0;
}

0 个答案:

没有答案