全部知识点
第4241题
有以下程序(字母A的ASCII代码为65)
#include <stdio.h>
main()
{
char c1 ='A',c2 ='Y';
printf("%d, %d\n",c1,c2);
}程序运行后的输出结果是()。
第4242题
有以下程序:
#include <stdio.h>
main()
{
char ch='Z';
ch=(ch-'A'+1)%26+'A';
putchar(ch);
}程序的运行结果是()。
第4243题
若有以下程序
#include <stdio.h>
main()
{
char c1, c2;
c1='C'+'8'-'3';
c2='9'-'0';
printf("%c %d\n",c1,c2);
}则程序的输出结果是()。
第4244题
有如下程序
#include <stdio.h>
main()
{
if('\0'== 0)putchar('X');
if('0'== 0)putchar('Y');
if('a'>'b')putchar('Z');
printf("\n");
}程序运行后的输出结果是()。
第4245题
有如下程序:
#include <stdio.h>
main()
{
char ch='A';
while(ch<'D')
{
printf("%d",ch-'A');
ch++;
}
printf("\n");
}程序运行后的输出结果是()。
第4246题
有如下程序:
#include <stdio.h>
main()
{
char ch='M';
while(ch!='K')
{
ch--;
putchar(ch);
}
printf("\n");
}程序运行后的输出结果是()。
第4247题
有以下程序:
#include <stdio.h>
void fun(char *c)
{
while(*c)
{
if(*c>='a'&&*c<='z')*c=*c-('a'-'A');
c++;
}
}
main()
{
char s[81];
gets(s);
fun(s);
puts(s);
}当执行程序时从键盘上输入Hello Beijing<回车>,则程序的输出结果是()。
第4248题
有以下程序
#include <stdio.h>
main()
{
char b,c;
int i;
b='a';
c='A';
for(i=0;i<6;i++)
{
if (i%2) putchar(i+b);
else putchar(i+c);
}
printf("\n");
}程序运行后的输出结果是()。
第4249题
有以下程序:
#include <stdio.h>
void fun(char*s)
{
while(*s)
{
if(*s%2==0)printf("%c",*s);
s++;
}
}
main()
{
char a[]=("good");
fun(a);
printf("\n");
}注意:字母a的ASCII码值为97,程序运行后的输出结果是()。
第4250题
以下不是C语言字符型或字符串常量的是()。
第4251题
C语言中char类型数据占字节数为()。
第4252题
有说明语句:
char c='\72';
则变量c中存放的是()。
第4253题
已知字符A的ASCII代码值是65,字符变量c1的值是A,c2的值是D。则执行语句
printf("%d,%d",c1,c2-2);的输出结果是()。
第4254题
有以下程序(说明:字母A的ASCII码值是65):
#include <stdio.h>
void fun(char *s)
{
while(*s)
{
if(*s%2)printf("%c",*s);
s++;
}
}
main()
{
char a[]="BYTE";
fun(a);
printf("\n");
}程序运行后的输出结果是()。
第4255题
有以下程序:
#include <stdio.h>
main()
{
char c1,c2;
c1='A'+'8'-'4';
c2='A'+'8'-'5';
printf("%c,%d\n",c1,c2);
}已知字母A的ASCII码值为65,程序运行后的输出结果是()。
第4256题
有以下程序:
#include <stdio.h>
main()
{
char ch='B';
while(ch<'E')
{
printf("%d",ch-'A');
ch++;
}
printf("\n");
}程序运行后的输出结果是()。
第4257题
以下不能输出小写字母a的选项是()。
第4258题
有以下程序:
#include <stdio.h>
mian()
{
char c;
for(;(c=getchar())!= '#';) putchar(++c);
}执行时如输入为:abcdefg##<回车>,则输出结果是()。
第4259题
有如下程序:
#include <stdio.h>
main()
{
int i;
for(i=0;i<5;i++)
putchar('Z'-i);
}程序运行后的输出结果是()。
第4260题
有如下程序:
#include<stdio.h>
main()
{
int i;
for (i=0;i<5;i++)
putchar('9'-i);
printf("\n");
}程序运行后的输出结果是()。