【判断题】【消耗次数:1】
char[] str=abcdefgh;
正确
错误
参考答案:
复制
纠错
相关题目
【单选题】 已有定义char str1[15]={“computer”} , str2[15] ; 则语句用法正确的是()。
①  str2=str1;
②  str2=science;
③  scanf(%s,str2);
④  printf(%s,str1);
【判断题】 String str=abcdefghi;char chr=str.charAt(9);
①  正确
②  错误
【单选题】 对于以下结构定义:struct{intlen;char*str;}*p;p->str++中的++加在()
①  指针str上
②  指针p上
③  str所指的内容上
④  以上均不是
【简答题】 下面程序的运行时,输入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
【单选题】 下面是对字符数组str 的初始化语句,其中不正确的是()。
①  char str[5]={abcd};
②  char str[5]={’a’,’b’,’c’,’d’};
③  char str[]=abcd;
④  char str[5];str=abcdef;
【判断题】 String str=abcedf; int length=str.length;
①  正确
②  错误
【单选题】 struct student{long int num;char name[20];char sex;char addr[20];}______。以下能够正确定义的是
①  a={Li Lin,10101,M,123 Beijing Road
②  a={10101,Li Lin,123 Beijing Road,M
③  a={10101,Li Lin,M,123 Beijing Road
④  a={123 Beijing Road,Li Lin,M,10101};
【单选题】 已有定义charstr1[15]={"computer"},str2[15];则语句用法正确的是()。
①  str2=str1;
②  str2="science";
③  scanf("%s",str2);
④  printf("%s",str1);
【单选题】 对字符串str = welcome to china进行下列操作处理时,描述结果正确的是()
①  str.substring(1,5)返回值是elcom
②  str.length的返回值是16
③  str.indexOf(come,4)的返回值为4
④  str.toUpperCase( )的返回值是welcome to china
随机题目
【单选题】 The dean of the Philosophy Department requested that the visiting scholar ______ a lecture on the philosopher Sartre.
①  gave
②  give
③  would give
④  had given
【单选题】 It became harder for women married to diplomats(外交家) to _______ their own interests.
①  pursue
②  replace
③  absorb
④  convince
【单选题】 As a result of his hard work, he has gained ______ to the Beijing University.
①  access
②  commitment
③  opportunity
④  reward
【单选题】 Planning so far ahead _____ no sense -- so many things will have changed by next year.
①  made
②  is making
③  makes
④  has made
【单选题】 How can you keep the machine ()when you are away?
①  run
②  to run
③  running
④  being run
【单选题】 I hate people who ____ the end of a film that you haven’t seen before.
①  reveal
②  rewrite
③  revise
④  reverse
【单选题】 Since the matter was extremely _____, we dealt with it immediately.
①  tough
②  tense
③  urgent
④  instant
【单选题】 As to who is to be hired, it is the Human Resources Department()has the final say.
①  whose
②  those
③  these
④  that
【单选题】 Twenty people were _______ wounded in the air crash.
①  quickly
②  wrongly
③  bitterly
④  seriously
【单选题】 Evidence came up _____ specific sounds are recognized by babies as young as 6 months old.
①  what
②  that
③  which
④  why