首页 > 技术文章 > two's complement,2的补码

byronsh 2018-12-13 23:56 原文

Let's start with one question.

Q: What's the output of below program?

#include <stdio.h>

void main(void)
{
    char a = -1;
    printf("a = %d\n", (unsigned char)a);
}

Hope the rest of this article can help you answer this question.

推荐阅读