freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

全國2001年10月高等教育自學考試面向對象程序設計試題(編輯修改稿)

2025-08-31 14:15 本頁面
 

【文章內容簡介】 于計算兩個向量的和。在下面橫線處填上適當字句,完成函數(shù)模板定義。#include templateclass TT* f(T* a,T* b,int n){ T* c=_________。 for(int i=0。in。i++) c[i]=_________。 return c。}void main(){ int a[5]={1,2,3,4,5},b[5]={10,20,30,40},*p。 p=f(a,b,5)。 for(int i=0。i5。i++) coutp[i]endl。},在橫線處填上適當語句完成程序功能。#include #include _________//定義由PASS指針所指向的口令wolleh。void main(){ char user[10]。//用于存放輸入的口令 cout″please input your password:″endl。 _________//輸入口令 if((strcmp(user,PASS))==0) cout″your password is correct″endl。 else cout″your password is error″endl。}(分數(shù))的定義,其中重載的運算符以分數(shù)形式輸出結果,例如將三分之二輸出為2/3。在橫線處填上適當字句。class fraction{ int den。 //分子 int num。 //分母 friend ostreamamp。 operator(ostreamamp。,fraction)。 …}。ostreamamp。 operator (ostreamamp。 os,fraction fr){ _________。 return _________。},使其輸出結果為0,56,56。#include class base{ public: _________func( ){return 0。}}。class derived:public base{ public: int a,b,c。 _________ setValue(int x,int y,int z){a=x。b=y。c=z。} int func( ){return(a+b)*c。}}。void main(){ base b。 derived d。 cout( )′,′。 (3,5,7)。 cout( )′,′。 baseamp。 pb=d。 cout( )end1。}五、程序分析題(本大題共6小題,每小題5分,共30分) 給出下面各程序的輸出結果。31.#include void main( ) { int *a。 int *amp。p=a。 int b=10。 p=amp。b。 cout*a。 } 輸出為:32.#include templateclass T Tf(T*a,T*b,int n){ Ts=(T)0。 for(int i=0。in。i++) s+=a[i]*b[i]; r
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1