【判断题】【消耗次数: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
随机题目
【单选题】 ___ he is poor, he is well contented.
①  although
②  if
③  unless
④  while
【单选题】 It was ___ it rained heavily that they didn’t come.
①  as
②  because
③  for
④  since
【单选题】 1. We cant ___ one to change the habits of a lifetime in a short time.
①  hope
②  wait
③  expect
④  imagine
【单选题】 There were dirty marks on her trousers ___ she had wiped her hands.
①  where
②  which
③  when
④  that
【单选题】 EBay, Amazon and WalMart are popular websites ___ people can sell goods to each other.
①  where
②  which
③  when
④  whose
【单选题】 I hope ___ the little ___ I have been able to do has been of some use.
①  that; that
②  /; by which?
③  what; what
④  /; with which
【单选题】 The hours ___ the children spend in their one-way relationship withtelevision people undoubtedly affect their relationships with real-life people.
①  when
②  that
③  in which
④  on which
【判断题】 He has been in china for three years.
①  正确
②  错误
【判断题】 Dont get off the bus until it will stop.
①  正确
②  错误
【判断题】 These clothes need wash.
①  正确
②  错误