以下程序的输出是 。 main() char str1[]="How do you do",*p1=str1; strcpy(str1+strlen(str1)/2"es she"); printf(’%s\\n",p1);
举一反三
- 程序运行后的输出结果是( ) main() { char *str[]={"AA","BB","CC"}; str[1]=str[2]; printf("%s,%s,%s\n",*str,str[1],*(str+2)); }
- 下列程序运行后的输出结果是______ int main(){ char str[]="The_Microsoft"; int n=4; sub(str,0,n-1); sub(str,0,strlen(str)-1); printf("%s\n",str);}sub(str,n1,n2){ char *str; int n1,n2; char c,*p; p=str+n2; str=str+n1; while(str
- #include #include main() {char str[][20]={"One*World","One*Dream!"}; char *p=str[1]; printf(“%d,”,strlen(p)); printf("%s ",p); } 程序运行后的输出结果是
- 有以下程序#include <stdio.h>#include <string.h>main(){ char str[ ][20]={“One*World”, “One*Dream!”},*p=str[1];printf(“%d,”,strlen(p));printf(“%s ”,p);}程序运行后的输出结果是()
- 编写strlen函数。 int my_strlen(char *str) { (1) } int main() { char str1[] = "abcdefghijklmnopqrstuvwxyz"; printf("%d", my_strlen(str1)); system("pause"); return 0; }