若已包括头文件<string.h>且已有定义char s1[18],s2={"ABCDE"}和int i,现要将字符串 "ABCDE"赋给s1,下列语句错误的是()
相似题目
-
printf函数是一个标准库函数,它的函数原型在头文件"string.h"中。
-
当执行下面的程序时,如果输入ABC,则输出结果是()。 #include "stdio.h" #include "string.h" main() { char ss[10]="12345"; gets(ss); strcat(ss,"6789"); printf("%s\n",ss); }
-
设已有定义:char*st=”howareyou”;下列程序段中正确的是()。
-
02680041:printf函数是一个标准库函数,它的函数原型在头文件string.h中。()
-
以下程序的输出结果是( ) #include iostream.h #include string.h void main() { char *p[10]={abc,aabdfg,dcdbe,abbd,cd}; cout<
-
若已定义char s[10];则在下面表达式中不表示s[1]的地址是( )。
-
若已有定义chars[10];inti;下列输入函数调用中错误的是()。
-
设已有定义: char *st=how are you
-
写出以下程序运行后的输出结果。 #includestdio.h #include string.h int main() { char st[20]={hello\0\t\\\}; printf(%d,%d\n,strlen(st),sizeof(st)); return 0; }
-
已有定义: char a[ ]=\xyz\,b[ ]={'x', 'y', 'z'}; ,下列叙述中正确的是( )。
-
下面程序的输出结果是( ).#include \string.h\main( ){ char *p1=\abc\,*p2=\ABC\,str[50]= \xyz
-
下面程序的运行结果是______。 #include < stdio.h > #include < string.h > main() { char a[7]=\abcdef\,b[4]=\ABC
-
已有定义:char c;,程序前面已在命令行中包含ctype.h文件,不能用于判断c中的字符是否为大写字母的表达式是
-
下列程序的输出结果是()。include<stdio.h>include<string.h>main(){ char a[]="\n123\\"; printf("%d,%d\n",strlen(A) ,sizeof(A) );}
-
若已包括头文件<string.h>且已有定义char s1[18],s2={"ABCDE"}和int i,现要将字符串 "ABCDE"赋给s1,下列语句错误的是()。
-
有以下程序 include <string.h> main(int argc ,char *argv[ ]) { int i,len=0; for(i=1;i
-
有以下程序 include<string.h> main() { char *p=“abcde、Ofghjik\0”; printf(“%d\n”,strlen(p)); } 程序运行后的输出结果
-
下列程序的输出结果是()。 include<stdio.h> include<string.h> main() { char a[]="\n123\\"; printf("%d,%d\n",strlen(a),sizeof(a)); }
-
有以下程序 include <string.h> main(int argc, char *argv[]) {int i=1,n=0; while(i<argc) {n=n+strlen(argv[i]);i++;} printf("%d\n",n); } 该程序生成的可执行文件名为:proc.exe。若运行时输入命令行: proc 123 45 67 则程序的输出结果是______。
-
设已有定义:char*st="how are you";,下列程序段中正确的是______。
-
有以下程序:# include <stdio.h># include <string.h>main(){char x[]="STRING";x[0]=0;x[1]="\0";x[2]="0";printf("%d%d\n", sizeof(x),strlen(x));}程序运行后的输出结果是______。
-
设已执行预编译命令include<string.h>,以下程序段的输出结果是char s[]=" an apple" ;printf(" %d\n",strlen(s));
-
当执行下面的程序时,如果输入ABC,则输出结罘是()。 include<stdio.h> include<string.h> main() { char ss[10]="1,2,3,4,5": gets(ss);strcat(ss,"6789");printf("%s\n",ss); }
-
有以下程序 include<stdio.h>include<string.h>typedef struct stu { char name[10]; char gender; int score; } STU; void f(); } 程序的运行结果是
推荐题目
- 1964年谁明确提出了“电影作者论”()
- 广播、电视、报纸、电信等媒体向社会传播气象预报和灾害性天气警报,下列哪个说法是正确的:()
- 依照我国最高人民法院的相关司法解释,下列财产中属于夫妻个人财产的有()。
- 工业生产中黄铜的含锌量不超过47%。含锌量小于()时,锌全部溶于铜中,形成α固溶体,称为单相黄铜。
- 关于生物-心理-社会医学模式的描述,错误的是()
- “三苏”是指( )。
- 海警侦察船执行侦察任务主要是完成()
- 双水相萃取可用于醇类、脂肪族羧酸、氨基酸、抗生素、维生素等生物小分子的分离与纯化。
- 正常脑组织重1300~1500g,占全身体重的2%,而供应脑组织的血流量占全身的()
- 下列选项属于中国古代的“六艺”的有( )。