第1个回答 2008-05-05
//你那去运行调试马上知道结果
#include <stdio.h>
main()
{
char a;
printf("请输入一个字符:");
scanf("%c",&a);
printf("你输入的字符的ASCII为%d",a);
}
第2个回答 推荐于2017-10-09
char t;
scanf("%c",&t);
printf("%d",(int)t);本回答被提问者采纳
第3个回答 2015-09-12
比如s=“abcdefgh”,则输出:t=“aceg”
程序代码:
#include <stdio.h>
#define SIZE 31
int main(void) {
char s[SIZE] = "abcdefgh", t[SIZE], * p1 = s, * p2 = t;
while(*p1)
*p1 % 2 ? *p2++ = *p1++ : p1++;
*p2 = '\0';
printf("%s\n", t);
return 0;
}
第4个回答 2008-05-05
#include <stdio.h>
#include <stdlib.h>
void main ()
{
int ASCII;
char ch;
printf ("input :");
ch=getchar();
ASCII=(int)ch;
printf ("ASCII=0x%x\n",ASCII);
}