有如下程序,该程序运行后的输出结果是。#inclu

有如下程序,该程序运行后的输出结果是()。

#include<iostream>
using namespace std;
class sample
{
private:
    int x,y;
public:
    sample(int i,int j)
    {
        x=i;
        y=j;
    }
    void disp()
    {
        cout<<"disp1"<<endl;
    }
    void disp()const
    {
        cout<<"disp2"<<endl;
    }
};
int main()
{
    const sample a(1,2);
    a.disp();
    return 0;
}
答案
B

题目信息

题号:6006
题型:单选题
难度:普通