单项选择题

有如下程序: #include using namespace std; class A { public: A(int i){ x=i;} void dispa(){cout<
A.10,2
B.12,10
C.12,10
D.2,2

<上一题 目录 下一题>
热门 试题

填空题
下面程序的运行结果为【 】。# include <iostream.h>void fun(int x=0,int y=0){cout << X << y;=void main( ){fun(5);}
单项选择题
下列程序的输出结果是( )。#include<iostream.h>void main( ){ char * str= 12123434 ;int x1=0,x2=0,x3=0,x4=0,i;for(i=0;str[i]!=’’ 0’’;i++)switch(str[i]){ case’’1’’:x4++;case’’2’’:x3++;case’’3’’:x2++;case’’4’’:x1++;}cout < < x1 < < , < < x2 < < , < < x3 < < , < < x4;
A. 8,6,4,1
B. 8,6,3,2
C. 8,8,4,1
D. 8,6,4,2
相关试题
  • 在c++语言的面向对象程序设计框架中,【...
  • 将一个函数声明为一个类的友元函数必须使用...
  • 语句cout < < ’’ n’’还可表示为...
  • 构造函数是和【 】同名的函数。
  • 用以下语句调用库函数malloc,使字符指针st...