Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
#include <stdio.h> int main () { unsigned char a=250,b=20, c; c=a+b; printf ("%d\n",c); return 0; }
270を表示するにはどうすればよいですか?c を int として宣言する以外に。
符号なしの char ( char が 8 ビットのみであると仮定) は、0 から 255 までの2 8の数値のみを表すことができますint。これを表すには、別の型を使用する必要があります。
int
申し訳ありませんが、できません。unsigned char は最大 255 まで保持できます。