傻大方


首页 > 学习 >

上海交通大学|上海交通大学C++复习题(1)( 二 )

傻大方摘要:【上海交通大学|上海交通大学C++复习题(1)( 二 )|C|复习题】9、-D 7-A 8-B 9-A 10-D 11-A 14-B 15-C 16-D 17-C 18-C 19-C 20-D 三、运行结果为: D:virfun() called. 五、仅供参考 #define SIZE 100 class Stack public: Stack() tos = 0; void Push(char ch)...



按关键词阅读: 复习题 C 上海交通大学



9、-D 7-A 8-B 9-A 10-D 11-A 14-B 15-C 16-D 17-C 18-C 19-C 20-D 三、运行结果为: D:virfun() called. 五、仅供参考 #define SIZE 100 class Stack public: Stack() tos = 0;
void Push(char ch) if (tos = SIZE) coutnStack is full.n;
else stcktos+ = ch;
char Pop() if (tos = 0) return 0;
else returnstcktos-;
private: charstckSI 。

10、ZE;
inttos;
;
六、仅供参考 templatetypenameTypename void swap(Typenamex, Typenamey) Typename temp = x;
x = y;
y = temp;
templatetypenameTypename void inverse(Typename *a, int n) inti;
for (i = 0;
i n / 2;
i+) swap(ai, an - i - 1);
七、仅供参考 intstr_count(char *substr, char *str) int count = 0;
char *pChar;
if (substr = NULL | str = NULL) return count;
while (*str != 0) pChar = substr;
while (*pChar = *str) pChar+;
if (*pChar = 0) count+;
break;
elsestr+;
str+;
return count;
另附: :/doc.wendoc /p-425942485.html 112021年7月 Word版本 。


稿源:(未知)

【傻大方】网址:/a/2021/0821/0023864418.html

标题:上海交通大学|上海交通大学C++复习题(1)( 二 )


上一篇:毕业|毕业顶岗实习总结

下一篇:范文大全|(精选)安全生产方针目标[范文大全]