7、下述程序的输出结果是: ***int main() { int a=5,b=0,c=0; if(a=b c) cout<<'***'; else cout<<'$$$'; return 0; }
8、以下程序的运行结果是s=2,t=3 #include using namespace std; int main() { int s=1,t=1,a=5,b=2; if (a>0) s ; if (a>b) t =s; else if (a==b) t=5; else t=2*s; cout<<'s='< 9、以下程序的运行结果是2。 int main() { int k=2; switch(k) { case 1:cout< 10、if和else语句必须同时使用。
6、现在需要对list类对象使用的逻辑运算符==重载,以下函数声明正确的是? a、list &list::operator==(const list &a); b、list list::operator==(const list &a); c、bool &list::operator==(const list &a); d、bool list::operator==(const list &a);