IGT 2014校園招聘筆試題 武漢站

1、輸出結果

#include <iostream>

using namespace std;

int main()
{
int i = 4;
double d = 5.0;
cout<<sizeof(i < d ? i : d)<<endl;
return 0;

}

2、#ifndef , #define,#endif 作用

3、#include “”   #include <>區別

4、cdecl  stdcall fastcall 區別

5、如何調用一個DLL文件中的函數,如何將函數寫入到一個dll文件
6、進程和線程的關係
7、vector 中 capability 和 size 區別 
8、至少寫出c++的三個特性
9、非遞歸層次遍歷二叉樹
10、輸出:
#include <iostream>
using namespace std;


class Base
{
public:
virtual void output(int i=4)
{
cout<<"Base::output "<<i<<endl;
}
};


class Derived : public Base
{
public:
void output(int i=5)
{
cout<<"Derived::output "<<i<<endl;
}
};


int main()
{
Base *p;
Derived d;
p = &d;
p->output();
return 0;
}

輸出:

Derived::output 4

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章