若有以下程序: #include <iostream> using namespace std; class Base {int x; protected:int y; public:int z;void setx(int i){ x=i;}int getx ( ){ return x;} }; class Inherit : private Base { private:int m; public:int p;void setvalue(int a,int b,int c, int d){ setx(a) ; y=b; z=c; m=d;}void display(){ cout<<getx ()<<", "<<y<<", "<<z<<", "<<m<<end1;} }; int main() {Inherit A;A.setvalue(1,2,3,4);A.display();return 0; } 程序运行后的输出结果是( )。
A.1,2,3,4
B.产生语法错误
C.4,3,2,1
D.2,3,4,5