有趣的思考题
来源:互联网 发布:淘宝要3c认证怎么办 编辑:程序博客网 时间:2024/05/16 18:15
饭前看到一个有趣的小问题,水一发~~
1.写一段C++程序,满足下列条件:
a.输出hello。b.删掉第一个字符,输出world。
2.写一段C++程序,满足下列条件:
a.输出hello。b.删掉最后一个字符,输出world。
思考中
……
……
……
……
……
……
……
……
……
……
……
……
……
……
……
1.
//*#define hh//*/#include<stdio.h>#include<iostream>using namespace std; int main(){ bool f=0; #ifdef hh f=1; cout<<"hello"<<endl; #endif if(!f) cout<<"world"<<endl; return 0;}
2.
#include<stdio.h> #include<iostream>using namespace std; #define hh int main(){puts("hello");} #define h int main(){puts("world");} hh
0 0
- 有趣的思考题
- 有趣的爱因斯坦的思考题
- 爱因斯坦的思考题
- 有关内存的思考题
- 有关内存的思考题
- 内存的思考题
- 有关内存的思考题
- 请教内存的思考题
- 一个有意思的思考题
- 爱因斯坦的思考题
- 爱因斯坦的思考题
- 有关内存的思考题
- 面向对象的思考题
- 有关内存的思考题
- 有关内存的思考题
- 乘方的思考题
- 有关内存的思考题
- java的一道思考题
- 我的科研生活2017-3-10
- 《ACM程序设计》书中题目 K
- java再复习-Exchanger的使用
- Android逆向入门-动态分析技术终极篇(破解加固的apk)
- 冒泡排序优化之鸡尾酒排序法
- 有趣的思考题
- js中创建对象的几种方式示例介绍
- 关于Python中的zipfile
- The Unique MST prim2
- 时空互动虚拟引擎
- oracle11g 常用系统表整理
- Hackinglab 基础关 write up
- 入门必看之-Linux 是什么?
- 阶梯博弈