运行程序,程序输出结果为() #include <iostream> using namespace std; int main() { str
运行程序,程序输出结果为() #include <iostream> using namespace std; int main() { struct s { int x; } a[3]; cout< <sizeof(a); return 0;> A、4
B、12
C、18
D、6
运行程序,程序输出结果为() #include <iostream> using namespace std; int main() { struct s { int x; } a[3]; cout< <sizeof(a); return 0;> A、4
B、12
C、18
D、6
第1题
include<iostream>
using namespace std;
void main()
{
int num=0,i=8;
do
{
i--;
num++;
}while(--i);
cout<<num<<endl;
}
第2题
A.编译时出现语法错误,不能生成可执行文件
B.运行时一定输出ThevalueatP:9
C.运行时一定输出ThevalueatP:*9
D.运行时有可能出错
第3题
#include<iostream>
#includediomanip>
usingnamespacestd;
intmain( ){
ints[]={123,234);
cout<<setfill('*')<<setw(6);
for(inti=0;i<2;i++){cout<<s[i]<<endl;)
return0;
}
运行时的输出结果是( )。
A.123
B.***123
234234
C.***123
D.***123
***234234***
第4题
A.123
B.***123 234234
C.***123
D.***123 ***234234***
第5题
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
cout<<setw(10)<<setfill(’X’)<<setprecision(8)<<left;
cout<<12.3456793<<______<<98765;
return 0;
}
若程序的输出是12.345679x98765xxxxx,则划线处缺失的部分是
A.setw(10)
B.setfill(’X’)
C.setprecision(8)
D.right
第6题
include<iostream>
using namespace std;
int min(int a,int b)
{
if(a<b)return a;
else return b;
return 0;
}
void main()
{
cout<<min(1,min(2,3))<<endl;
}
第8题
A.23
B.58
C.64
D.79
第9题
A.23
B.58
C.64
D.79
第10题
A.2
B.3
C.5
D.8
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!