若字符串首地址为0x000657b0,n的ASCII码为110,则下述代码片段输出结果为( )char *s = "programs";s+=6;printf("%s ",s);printf("%c ",*s);printf("%d ",*s);printf("%x ",s);
查看答案
字符串常量“nice\0meet”在内存中占的字节数是____,长度是____。
以下程序输出结果是#include#includeint main(){char *p="Good",str[30]="Very";strcpy(str+1,p);str[4]='g';puts(str);return 0;}
int mylength(char *p){ int len=0; while(*p!='\0') { len++; ________ ; } return(len);}main(){ char str1[80]; scanf("%s",str1); printf("str1 的长度=%d",mylength(str1));}
以下程序输出结果是( )#include#includeint main(){char *p="Good",str[30]="Very";strcat(str,p);str[4]='g';printf("%s\n",str+2);return 0;}