下面程序段运行结果是( )。char a[]=”language”,*p;p=a;while(*p!=’u’) {pirntf(“%c”,*p-32);p++;}
A. LANGUAGE
B. language
C. LANG
D. language
查看答案
下面程序的运行结果是( )。#includemain(){static char a[ ]=“Language”,b[ ]=”programe”;char *p1, *p2; int k=0;p1=a; p2=b; printf(" %c”,*(p1+k));}
A. gae
B. L
C. Language
D. 有语法错误
下面程序运行结果是( )。#include#includemain(){char *s1=”AbDeG”; char *s2=”AbdEg”;s1+=2; s2+=2;printf(“%d\n”,strcmp(sl,s2));}
A. 正数
B. 负数
C. 零
D. 不确定的值
下面的程序的运行结果是( )。#includemain(){char *p,s[ ]=”ABCDEFG”;for(p=s; *p!=’\0’;){printf(“%s\n”,p);p++;if(*p!=’\0’)p++;else break; }}
ABCDEFGABCDEABCA
B. ABCDEFGBCDEFCDED
C. ACEG
D. ABCDEFGBCDEFEFGG
下面程序的运行结果是( )。#include#incudemain(){char* p1,*p2,str[50]=”abc”;p1=”abc”; p2=”abc”;strcpy(str+1,strcat(p1,p2));printf(“%s\n”,str);}
A. abcabcabc
B. bcabcabc
C. aabcabc
D. cabcabc