关于getchar和putchar的用法

问题遇到的现象和发生背景

想通过putchar输出代表真假的0和1,但是输出的结果不符合预期

问题相关代码,请勿粘贴截图

#include <stdio.h>
#include <stdlib.h>
int main()
{
int a=2,b=3;
int c;
c=(int)(a<b);
putchar(c);
return 0;
}

运行结果及报错内容

Process exited after 0.02781 seconds with return value 0
请按任意键继续. . .

我的解答思路和尝试过的方法

a<b为真
将1赋值给c
PS:试过c==(int)(a<b)也不行
再通过putchar输出c的值

我想要达到的结果

输出1

#include <stdio.h>
#include <stdlib.h>
int main()
{
int a=2,b=3;
int c;
c=(int)(a<b);
putchar(c+48);
return 0;
}

加上ascll码差值

#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 2, b = 3;
int c;
c = (int)(a < b);
printf("%d", c);
return 0;
}
这样

img