在调用函数时,如果实参是简单变量,它与对应形参之间的数据传递方式是 v。
A.地址传递
B.单向值传递
C.由实参传给形,再由形参传回实参
D.传递方式由用户指定
A.地址传递
B.单向值传递
C.由实参传给形,再由形参传回实参
D.传递方式由用户指定
第1题
以下程序的输出结果是 。 #include <iostream> #include <iomanip> using namespace std; void main() { int i; for (i=1;i>=0;) cout< <i--;>
第2题
以下程序的输出结果是#include <iostream>using namespace std;int main(){ cout.fill('*'); cout.width(5); cous<<hex<<100<<end1; return 0;}
A.**100
B.***64
C.100**
D.64***
第3题
以下程序的输出结果是【 】。
include <iostream>
using namespace std;
int main()
{
char S[ ]="abcdef";
s[3]='\0';
cout<<s<<end1;
return 0;
}
第4题
以下程序的输出结果是 #include<iostream> using nameSpace std; int main() { cout.fill('*'); cout.width(5); cout<<hex<<100<<end1; return 0; }
A.**100
B.***64
C.100**
D.64***
第5题
以下程序的输出结果是 。 #include <iostream> using namespace std; int fun(int k) { static int m=1; int n=2; m=k+m+n++; return m; } void main() { for(int i=0; i<3; i++)> <<’\t’; }>
第6题
以下程序的输出结果是()。 #include<iostream> using namespace std; int main() { cout.fill('*'); cout.width(5); cout<<hex<<100<<endl; return (); }
A.**100
B.***64
C.100**
D.64***
第7题
下列程序的输出结果是________。#include <iostream> using namespace std; int a=5; void fun (int a) { ::a -= --a; cout<<::a<<’\t’<><<’\n’; } int main() { a="5;" for(int i="-5;" fun(a); return 0;>
第8题
定义以下结构体类型,运行程序的输出结果是()。 #include <iostream> using namespace std; int main() { struct s{int a;double b;}; cout< <sizeof(s)> < <endl; return 0;> A、12
B、14
C、16
D、18
第9题
以下程序运行后的输出结果是 。 (条件表达式的多样性) #include <iostream> using namespace std; void main() { int a = 3, b = 4, c = 5, t = 99; if(b) if(a) cout< </iostream></endl;> << <t> < <endl; else>
第10题
运行程序,程序输出结果是(). #include <iostream> using namespace std; int main() { char str[100]="program",*p=str; str[3]=0; cout<
< <endl; return> A、ogram
B、r
C、o
D、pro
</endl;>
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!