有如下程序,在标注号码的四条语句中正确的是。#in
有如下程序,在标注号码的四条语句中正确的是()。
#include<iostream>
using namespace std;
class AA {
int k;
protected:
int n;
void setK(int k){this->k=k;}
public:
void setN(int n){this->n=n;}
};
class BB:public AA {/*类体略*/};
int main() {
BB x;
x.n=1; //1
x.setN(2); //2
x.k=3; //3
x.setK(4); //4
return 0;
}答案
B