读下列程序,写出程序的输出结果。#include void main (){int x[12]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};int *p;for (p=&x[3];p
查看答案
函数strcat(str1,str2)实现将字符串str2中的大写字母拼接到字符串str1后面的功能。char *strcat( char *str1, char *str2){ char *t=str1;while (*str1!='\0')(1) ;while ( *str2!='\0'){if((2) ){ *str1=*str2; str1++; }(3) ;}(4) ;return(t);}
将输入的字符串按逆序打印出来。例如,输入abcd,则按dcba顺序打印出来。#includemain(){char*str,s[20];intn;str=_(1)______;scanf(“%s”,(2)_________);n=strlen(str);while(--n>=0){str=&s[(3)_____];printf(“%c”,*str);}}
请阅读下面的程序,写出程序执行后的输出。#include int main(){int array[10]={1,2,3,4,5,6,7,8,9,10};int *p=&array[2];printf("%d\n",*p);p=p+5;printf("%d\n",*p);p++;printf("%d\n",*p);p=p-2;printf("%d\n",*p);if(*p
读下列程序,写出程序的输出结果。#include void main(){ char str[ ]=”abcdef”,*p=str;int i;for ( i=0; i<4 ; i++, p++ )puts(p);}输出结果为: