题目内容

程序段执行后的输出结果是 。char c[] = "\t\b\\\0will\n";cout<

A. 14
B. 3
C. 9
D. 6

查看答案
更多问题

下面程序 。void main(){float a[10]={0.0};int i;for(i=0;i<3;i++) cin>>a[i];for(i=1;i<10;i++) a[0]=a[0]+a[i];cout<

A. 没有错误
B. 第3行有错误
C. 第5行有错误
D. 第7行有错误

以下叙述中正确的是 。

A. 两个字符串所包含的字符个数相同时,才能比较字符串
B. 字符个数多的字符串比字符个数少的字符串大
C. 字符串"STOP "与"STOP"相等
D. 字符串"That"小于字符串"The"

下面程序执行后的输出结果是 。#include< iostream> using namespace std;#include "string"void main(){char ch[7] = "12ab56"; int i, s = 0;for (i = 0; ch[i] > '0'&&ch[i] <= '9'; i += 2)s = 10 * s + ch[i] - '0';cout << s;}

A. 1
B. 1256
C. 12ab56
D. ab

以下各组选项中,均能正确定义二维实型数组a 的选项是 。

A. float a[3][4];float a[][4];float a[3][]={{1},{0}};
B. float a(3,4);float a[3][4];float a[][]={{0};{0}};
C. float a[3][4];float a[][4]={{0},{0}};float a[][4]={{1},{2},{3}};
D. float a[3][4];float a[3][];float a[][4];

答案查题题库