未分类题有如下程序: #include<iostream> using namespace std; class TestClass { private: int x,y; public: TestClass (int i,int j) { x=i; y=j; } void print() { cout<<'print1'<<end1; } void print()const { cout<<'print2'<<end1; } }; int main() { const TestClass a(1,2); A.print(); return 0; } 该程序运行后的输出结果是( )。A.print1B.print2C.print1 print2D.程序编译时出错
A.print();
B.print1
B.print2
C.print1