打印输出:unsigned int, short, long, long long

#include <stdio.h>

int main(void)
{
    unsigned int un = 3000000000; /* system with 32-bit int */
    short end = 200;              /* and 16-bit short       */
    long big = 65537;
    long long verybig = 12345678912345;

    printf("un = %u and not %d/n", un, un);
    printf("end = %hd and %d/n", end, end);
    printf("big = %ld and not %hd/n", big, big);
    printf("verybig= %lld and not %ld/n", verybig, verybig);

    return 0;
}

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266568.html

(0)
上一篇 2022年6月7日
下一篇 2022年6月7日

相关推荐

发表回复

登录后才能评论