单项选择题

关于swish语句的说明中,错误的是( )。

A.default 语句是可确省的
B.各个分支中的break 语句起着退出switch语句的作用
C.swish结构不可以嵌套
D.每个case语句中不必用,而整体的switch结构一定要写一对花括号
<上一题 目录 下一题>
热门 试题

单项选择题
类模板template<class T>class x...,其中,友元函数f对特定类型T(如int),使函数 f(x<int>);成为x<int>模板类的友元,则其说明为( )。
A.friend void f();
B.friend void f(x<T>);
C.friend void A:: f()
D.friend void C<D:: f(x<T>);
单项选择题
有如下类声明: class XA int x;public: XA(int n) x=n;;class XB: public XA int y;public: XB(int a, int b);;在构造函数朋的下列定义中,正确的是( )。
A.XB::XB(int a,int b): x(a),y(b)
B.XB::XB (int a,int b):XA(a),y(b)
C.XB::XB(int a,int b): x(a),XB(b)
D.XB::XB(int a,int b):XA(a),XB(b)
相关试题
  • 有以下程序:#include <iostream>using...
  • 有如下程序#include <iostream>#inclu...
  • 以下程序段的输出结果是( )。int x =...