[试题]

若有以下程序main(){ char a; a=’H’-’A’+’0’; printf("%c/n",a);}执行后的输出结果是

参考答案与解析:

相关试题

有以下程序:point(char *p){P£«=3;)main(){char

[单选题]有以下程序: point(char *p){P+=3;) main() { char b[4]={'a','b','c','d'},*p=b; point(p);printf("%c/n",*p); } 程序运行后的输出结果是( )。A.aB.bC.cD.d

  • 查看答案
  • 有以下程序:point(char *p){ p£«=3;}main(){char

    [单选题]有以下程序: point(char *p) { p+=3; } main() { char b[4]={'a','b','c','d'}, *p=b; point(p); printf("%c/n",*p); } 程序运行后的输出结果是( )。A.aB.bC.cD.d

  • 查看答案
  • 有以下程序#include main(){ char *p,*q;p=(char

    [单选题]有以下程序include main(){ char *p,*q;p=(char*)malloc(sizeof(char)*20);q=p;scanf有以下程序 #include <stdlib.h> main() { char *p,*q; p=(char*)malloc(sizeof(char)*20); q=p; scanf("%s %s",p,q); printf("%s %s/n",p,q); } 若从键盘输入:abc def<回车>, 则输出结果是A.def defB.abc

  • 查看答案
  • 有以下程序#include <string.h>main( ){ char p[

    [单选题]有以下程序#include <string.h>main( ){ char p[20]={ 'a', 'b', 'c', 'd'},q[]="abc", r[]="abcde"strcat(p,r); s trcpy(p+strlen(q),q);p rintf("%d/n", strlen (p));}程序运行后的输出结果是A.)9B.)6C.)11D.)7

  • 查看答案
  • 有以下程序#include <string.h>main( ){ char p[

    [单选题]有以下程序#include <string.h>main( ){ char p[20]={'a','b','c','d'},q[]="abc", r[]="abcde";strcpy(p+strlen(q),r); strcat(p,q);printf("%d%d/n",sizeof(p),strlen(p));}程序运行后的输出结果是A.)20 9B.)9 9C.)20 11D.)11 11

  • 查看答案
  • 若有以下程序main(){ int p=5,a=5; if(p=1!=0) pr

    [主观题]若有以下程序main(){ int p=5,a=5; if(p=1!=0) printf("%d/n",p); else printf("%d/n",p+2);}程序执行后的输出结果是

  • 查看答案
  • 有以下程序point(char*p){p£«=3;}main() {char b

    [单选题]有以下程序 point(char*p){p+=3;} main() { char b[4]={'a','b','c','d'},*p=b; point(p);printf("%c/n",*p); } 程序运行后的输出结果是A.aB.bC.cD.d

  • 查看答案
  • 有以下程序 #include<string.h> main() {char p[

    [单选题]有以下程序#include<string.h>main(){ char p[]={′a′, ′b′, ′c′},q[10]={ ′a′, ′b′, ′c′};printf("%d%d/n",strlen(p),strlen(q));}以下叙述中正确的是A.在给p和q数组置初值时,系统会自动添加字符串结束符,故输出的长度都为3B.由于p数组中没有字符串结束符,长度不能确定,但q数组中字符串长度为3C.由于q数组中没有字符串结束符,长度不能确定,但p数组中字符串长度为3D.由于p和q

  • 查看答案
  • 有以下程序 #include<string.h> main() {char p[

    [单选题]有以下程序#include<string.h>main(){ char p[]={′a′, ′b′, ′c′},q[10]={ ′a′, ′b′, ′c′};printf("%d%d/n",strlen(p),strlen(q));}以下叙述中正确的是A.在给p和q数组置初值时,系统会自动添加字符串结束符,故输出的长度都为3B.由于p数组中没有字符串结束符,长度不能确定,但q数组中字符串长度为3C.由于q数组中没有字符串结束符,长度不能确定,但p数组中字符串长度为3D.由于p和q

  • 查看答案
  • 有以下程序 #include main() {char*p="abcde\0fg

    [单选题]有以下程序#includemain(){ char *p="abcde\0fghjik\0 ";printf("%d\n ",strlen(p));}程序运行后的输出结果是A.12B.15C.6D.5

  • 查看答案