皮皮学,免费搜题
登录
搜题
【简答题】
函数参数的传递 函数参数传递包括传值,传地址和引用类型做形参。 阅读运行如下4个函数中 请回答: 1)swap1(),swap2(),swap3(),swap4()中哪些能够完成交换? 2)理解4个swap的参赛传递的工作机制,通过debug设置断点,跟踪观察变量运行时的状态。回答问题需要截图到这里提交。截图包含如下几个123要素。 3)解释成功交换以及交换不成功的原因。 如果还有疑问,请参考超星1.4.2节里面的视频。 #include using namespace std; void swap1(float m,float n) { float temp; temp=m; m=n; n=temp; } void swap2(float *m,float *n) { float temp; temp=*m; *m=*n; *n=temp; } void swap3(float *m,float *n) { float *t; t=m; m=n; n=t; } void swap4(float &m,float &n) { float temp; temp=m; m=n; n=temp; } int main() { float a,b; cin>>a>>b; //输入 //swap1(a,b); //swap2(&a,&b); //swap3(&a,&b); //swap4(a,b); cout< < < <
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】The natives of the continent of America are the ______.
A.
Canadians
B.
Indians
C.
Mexicans
D.
Hispanics
【单选题】Who are the natives of Great Britain
A.
Anglos
B.
Saxons
C.
Celts
D.
Romans
【单选题】The natives of the continent of the America are the_____.
A.
Canadians
B.
Indians
C.
Mexicans
D.
Hispanics
【判断题】菠萝果肉为淡黄色,脆甜多汁,微酸,清凉爽口。萝有后熟性能。()
A.
正确
B.
错误
【单选题】Who were the natives of Australia before the arrival of the British settlers? (TEM8200633)
A.
The Aborigines
B.
The Maori
C.
The Indians
D.
The Eskimos
【单选题】The natives of the continent of America are the ( ).
A.
Mexicans
B.
Hispanics
C.
Indians
D.
Inuits
【单选题】Who were the natives of America?
A.
The Eskimo
B.
The Maori
C.
The Indians
D.
The Aborigines
【简答题】Heights of objects refer to the height of the structure above the _____地面____and are invariably expressed as “... m in height”.
【简答题】M is defined as the study of the internal structure and the formation of words.
【单选题】The early missionaries ______ the teaching of Christianity to the natives of Pacific islands but received cold responses.
A.
consolidated
B.
originated
C.
assimilated
D.
propagated
相关题目: