【单选题】【消耗次数:1】
程序段char a[ ]=“English”; char *p=a; int n=0; while( *p!=‘\0’){ n++; p++;} 结果中,n的值是( )。
A. 6
B.8
C.5
D.7
参考答案:
复制
纠错
相关题目
【单选题】 程序段char a[ ]=“English”; char *p=a; int n=0;while( *p!=‘\0’){ n++; P++;}结果中,P指向( )。
①  A. 字符h
②  B.a
③  C. 字符串的结束符
④  D.7
【简答题】 int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;int i;p=a;printf(%d\n,*p++);printf(%d\n,*++p);程序输出结果为[填空1]和[填空2]。
【简答题】 #includestdio.hint main(){int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;p=a;printf(%d\n,*p);p++;printf(%d\n,*p);}程序输出结果为[填空1]和[填空2]。
【单选题】 下述程序的运行结果( )。 #includevoid main() { int p,a=0; if(p=a!=0)printf(%d\n else printf(%d\n,p+2); }
①  1
②  2
③  3
④  5
【单选题】 以下函数的返回结果是( )。 int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度B.将字符串x连接到字符串p后面
②  将字符串x复制到字符串p中
③  将字符串x反向存放
【单选题】 以下函数的返回结果是( )。 int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度B.将字符串x连接到字符串p后面
②  将字符串x复制到字符串p中
③  将字符串x反向存放
【单选题】 以下函数的返回结果是() int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度
②  将字符串x连接到字符串p后面
③  将字符串x复制到字符串p中
④  将字符串x反向存放
【单选题】 以下函数的返回结果是(????) int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度
②  将字符串x连接到字符串p后面
③  将字符串x复制到字符串p中
④  将字符串x反向存放
【单选题】 设有如下函数定义 int f(char *s) { char *p=s; while(*p!=’\0’) p++; return(p-s); } 在主函数中用coutf(“good”)调用上述函数, 则输出结果为( )
①  3
②  4
③  5
④  6
【单选题】 设有如下函数定义 int f(char *s) { char *p=s; while(*p!=’\0’) p++; return(p-s); } 在主函数中用coutf(“good”)调用上述函数, 则输出结果为( )。
①  3
②  4
③  5
④  6
随机题目
【单选题】 在 HTML 文档中,引用外部样式表的正确位置是?
①  文档的末尾
②  文档的顶部
③  部分
④  部分
【单选题】 用于设置文本框显示宽度的属性是?
①  Size
②  MaxLength
③  Value
④  Length
【单选题】 下列( )表示 a 元素中的内容没有下划线
①  a {text-decoration:no underline}
②  a {underline:none}
③  a {text-decoration:none}
④  a {decoration:no underline}
【单选题】 标签<img src= ”pic1.gif ” align= ”center ”>的作用是?
①  插入图片 pic1.gif ,图片水平对齐采用“居中”方式
②  插入图片 pic1.gif ,图片垂直对齐采用“居中”方式
③  插入图片 pic1.gif ,图片右侧文字的水平对齐采用“居中”方式
④  插入图片 pic1.gif ,图片右侧文字的垂直位置相对图片“居中”
【单选题】 要实现表单元素中的单选框,input 标签的type 属性应设为?
①  radio
②  checkbox
③  select
④  text
【单选题】 如何去掉文本超级链接的下划线?
①  a {text-decoration:no underline}
②  a {underline:none}
③  a {decoration:no underline}
④  a {text-decoration:none}
【单选题】 若要是设计网页的背景图形为 bg.jpg ,以下标记中,正确的是?
① 
② 
【单选题】 网页文件中,能起到动画效果的图形格式是?
①  JPEG
②  GIF
③  TIF
④  BMP
【单选题】 下列哪种方式是用类选择器定义样式的?
①  p{color:red;}
②  .one{color:red;}
③  #two{color:red;}
④  p,h1{color:red;}
【单选题】 CSS是( )的缩写。
①  Colorful Style Sheets
②  Computer Style Sheets
③  Cascading Style Sheets
④  Creative Style Sheets