【简答题】【消耗次数:1】
下面程序的运行时,输入CLanguage↙,输出是[填空1]。#includestdio.hvoid main( ){ char str[30];scanf(%s,str); printf(%s,str);}
参考答案:
复制
纠错
相关题目
【单选题】 文本文件quiz.txt的内容为"Programming"(不包含引号),以下程序段的运行结果是()。FILE*fp;char*str;if((fp=fopen("quiz.txt","r"))!=NULL)str=fgets(str,7,fp);printf("%s",str);
①  Progr
②  Progra
③  Program
④  Programming
【简答题】 以下程序输入20个数,将其逆序输出。#includestdio.hvoid main() { int a[20],i; for(i=0;ii++) scanf(%d,[填空1]); for(i=19;ii--) printf(%d ,[填空2]); }
【单选题】 已有定义char str1[15]={“computer”} , str2[15] ; 则语句用法正确的是()。
①  str2=str1;
②  str2=science;
③  scanf(%s,str2);
④  printf(%s,str1);
【判断题】 String str=abcdefghi;char chr=str.charAt(9);
①  正确
②  错误
【判断题】 char[] str=abcdefgh;
①  正确
②  错误
【单选题】 若定义:string str; 当语句cin>>str; 执行时,从键盘输入:Microsoft Visual Studio 0! 所得的结果是str=( )。
①  Microsoft Visual Studio 0!
②  Microsoft
③  Microsoft Visual
④  Microsoft Visual Studio 0
【单选题】 对于以下结构定义:struct{intlen;char*str;}*p;p->str++中的++加在()
①  指针str上
②  指针p上
③  str所指的内容上
④  以上均不是
【单选题】 以下程序运行后,文件test.txt的内容是()。#includestdio.hmain(){FILE*fp;charstr[][10]={"first","second"};fp=fopen("test.txt","w");if(fp!=NULL)fprintf(fp,"%s",str[0]);fclose(fp);fp=fopen("test.txt","w");if(fp!=NULL)fprintf(fp,"%s",str[1]);fclose(fp);}
①  first
②  second
③  firstsecond
④  secondfirst
【单选题】 有如下程序段:Dim str1 As String * 5 Str1= ”Visual Basic”当该程序段被执行完时,变量Str1的值是()。
①  ”Visual ”
②  “ Visua ”
③  “ V ”
④  “ Visual Basic ”
【单选题】 有如下程序段:Dim str1 As String * 5 Str1= ”Visual Basic”当该程序段被执行完时,变量Str1的值是()。
①  ”Visual ”
②  “ Visua ”
③  “ V ”
④  “ Visual Basic ”
随机题目
【单选题】 x>0|| y==5的相反表达式为()。
①  x0 || y!=5
②  x>0 && y==5
【单选题】 程序中主函数的名字为()。
①  main
②  MAIN
③  Main
④  任意标识符
【单选题】 设”int a=15,b=26;”,则”cout<<(a,b);”的输出结果是()。
①  15
②  26,15
③  15,26
④  26
【单选题】 假定下列x和y均为int型变量,则不正确的赋值为()。
①  x+=y++
②  x++=y++
③  x=++y
④  ++x=++y
【单选题】 以下标识符中不全是保留字的是()。
①  caseforint
②  defaultthenwhile
③  boolclasslong
④  gotoreturnchar
【单选题】 假设在程序中 a、b、c 均被定义成整型,所赋的值都大于1,则下列能正确表示代数式的表达式是()。
①  1.0/a*b*c
②  1/(a*b*c)
③  1/a/b/(float)c
④  1.0/a/b/c
【单选题】 设x和y均为bool量,则x && y为真的条件是()。
①  它们均为真
②  其中一个为真
③  它们均为假
④  其中一个为假
【单选题】 下列的符号常量定义中,错误的定义是()。
①  const M=10;
②  const int M=20;
③  const char ch;
④  const bool mark=true;
【单选题】 设x是一个bool型的逻辑量,y的值为10,则表达式 x && y的值为()。
①  1
②  0
③  与x值相同
④  与x值相反
【单选题】 x>0&&x<=10的相反表达式为()。
①  x10
②  x10
③  x0 && x>10