笔果题库
高级语言程序设计
VIP题库
搜题找答案,就上笔果题库
#include"stdio.h" main() {chars[]="ABCDEFG",*p=s+7; while(--p>&s[0]) putchar(*p); }
搜题找答案,就上笔果题库
下列程序的功能是输入两个字符串分别存入字符型数组s1和s2中,然后将数组s2中的字符串连接到数组s1的后面,并存放到字符型数组S中,然后输出。请填充。 main() {charsl[40],s2[40],s[80],*p1,*p2,*p; ____; scanf("%s%s",p1,p2); while(*p1!='\0') ____; while(*p2!='\0') *p++=*p2++; *p='\0'; ____; printf("%s\n",p); }
搜题找答案,就上笔果题库
设有数据定义语句“char x[10]”,*P=x;”,若用指针法引用下标为3的数组元素有下列两种写法:____、____;若用下标法引用下标为3的数组元素有下列两种写法:____、____。
搜题找答案,就上笔果题库
设有说明int(*ptr)[M];其中的标识符ptr是()
搜题找答案,就上笔果题库
设int a[10],*P=a;则a[3]可以表示为P[____]和*[P____]。
搜题找答案,就上笔果题库
运行下列程序段时,输出结果是()char*p1="abcd",*p2="ABCD",s[50]="xyz";strcpy(s+2,strcat(p1+2,p2+1));printf("%s",s);
搜题找答案,就上笔果题库
若已定义:inta[9],*p=a;并在以后的语句中未改变p的值,不能表示a[1]地址的表达式为()
搜题找答案,就上笔果题库
下面程序的功能是利用指针统计一个字符串中字母、空格、数字及其他字符的个数,请填空。 #include<stdio.h> main() {intalpha,space,digit,other; char*p,s[80]; alpha=space=digit=other=0; printf("inputstring:\n"); gets(s); for(p=s;*p!='\0';p++) if(____) alpha++; elseif(____) space++; elseif(____) digit++; else other++; prinff("pha:%dspace:%ddigit:%dother:%d\n",alpha,space,digit,other); }
搜题找答案,就上笔果题库
设有定义语句”int x[8]={1,2,3,4,5,6},*p=x;”,则值为5的表达式是()
搜题找答案,就上笔果题库
若定义int i,*p;使p指向i的赋值语句是()