招聘题小结8.30
2013-08-30 16:14
232 查看
#include<iostream> using namespace std; int main() { char str1[] = "abc"; char str2[] = "abc"; const char str3[] = "abc"; const char str4[] = "abc"; const char *str5 = "abc"; const char *str6 = "abc"; char *str7 = "abc"; char *str8 = "abc"; if( str1 == str2) //测试1 { cout<<"str1==str2 equality"<<endl; } if( str3 == str4) { cout<<"str3==str4 equality"<<endl; } if( str5 == str6 ) { cout<<"str5==str6 equality"<<endl; } if( str7 == str8 ) { cout<<"str7==str8 equality"<<endl; } // str7[0] = 'A'; //测试2 错误 // cout<<str2<<endl; int a[5] = {1, 2, 3, 4, 5}; //测试3 int *ptr = (int *)(&a+1); cout<<*(a+1)<<endl; cout<<*(ptr-1)<<endl; return 0; }
相关文章推荐
- 国内著名IT公司(百度、搜狗、网易、新浪)2012校园招聘笔试、面试小结
- 国内著名IT公司(百度、搜狗、网易、新浪)2012校园招聘笔试、面试小结
- 2013校园招聘阶段小结
- 国内著名IT公司(百度、搜狗、网易、新浪)2012校园招聘笔试、面试小结
- 招聘题小结8.29
- 2013阿里巴巴安全工程师实习生招聘笔试小结
- 国内著名IT公司(百度、搜狗、网易、新浪)2012校园招聘笔试、面试小结
- 腾讯2009校园招聘笔试题(部分,2008.10.25)小结
- MySQL DBA 招聘小结
- MySQL DBA 招聘小结
- 2014阿里巴巴实习生招聘-研发工程师笔试题/网络编程小结
- 阿里招聘前端笔试题小结
- 媒体计算作业小结
- JavaSE基础小结--1---基于TCP的聊天程序
- 借首页发个帖,公司招聘,欢迎实力派
- Hibernate 关系映射小结
- 一个aspx、母版页、自定义控件的页面的生命周期小结
- ios学习开发阶段小结
- java中的log中的用法和小结
- 基于iCamera测试500w摄像头-mt9p001,mt9p031,mt9p001模块小结