|
|
???2014???????(?????)?????
???2014?3?29?
????????????????????
1.2????????????????????????????????????????????????______?
A.???????????????
B.?????????????????????
C.?????????????????????
D.???
B??????????????
2.?linux?????????????????______?
A.ps
B.cd
C.mv
D.ls
D???????????????ls
3.???????????????????????????????????????????????????______?
A.???????????????
B.?????????copyOnWrite????????
C.?????
D.????
C?????????
4.???????????????______?
A.???????????
B.????????????
C.??????????
D.????????????
B???????????
5.??????????????????????????????????????????????????????????????? ______?
A.???????????????
B.?????????????????????????????
C.?C?C++??????????????????????????????
D.????????????????????????????????
C????C??????
6.???????????????????????????????????????
? ????????90ns?80ns?70ns?60ns???????CPU???????____?
A.90ns
B.80ns
C.70ns
D.60ns
A
7.??????????
int i=-1;
unsigned j=1;
if (i<j)
printf((i<j)??
);
else
printf((ii)
printf((j>i)??
);
else
printf((j>i)???
);
A.(ii)??
B.(ii)???
C.(ii)??
D.(ii)???
D?????????????
8.??????????12453??????42513?????????______?
A.45231
B.42351
C.12345
D.54321
A
9.????????????????????______?
A.??10
B.??2
C.??2
D.??10
C
10.???????____????????CPU??____?
A.?????
B.?????
C.?????
D.?????
B
11??A?B?????????????_______?
A.??A????
B.??B????
C.??????????????????????B????
D.????
C
12.????????3???????8???1????????????????______?
A.12
B.13
C.14
D.15
C
??????? 2015 2014?????????????
???? 2015 ??????? ?????
???????????????????20????? 40???????3????80?????120???
???????
1?
??4?
2?
??4?
3?
??????? ???
4??????????______?
int main(void)
{
cout<< welcome to taobao"<<endl;
}
???????
??????
??????
??????
??????
??????
??????????
5?????????????______?
????????
?????????
D?E????
B?C?????
C???
E?F?????
6??????????????????????????????????????????????
? ???????????
? ???????????
? ???????????????????
? ?????????????????
??????????????????______?
??
??
??
?????
?????
?????
??????
7?????????????20???????????????????????????????????5???????100??????????100???????????????______?
?????????????????????
?100???????????????
?100??????????????????100?????????????????
?????100?????100??????????
??????5????????????????????5???????????
?????????1?????????
???????
8??6?12????????26???????______????????????????????
13
15
22
24
25
26
???13
9????????????float?????
return????????????______?
char
int
float
long
double
?????
???double
10?Linux????????????root???setid????????mike??????????????????????????______?
root mike
root root
mike root
mike mike
deamon mike
mike deamon
11??32?????????????8?????______?
short int
int C long
unsigned int
long long
char
int
???? int
12???IP??????????______?
IP???????????????????????
?????????IP????????
202.112.139.140??B???
??C???????254???
IPv6??128?????
A??B??C??????????
13??m?n??int???????for?????______?
for(m=0,n=-1;n=0;m++,n++)n++;
?????????
???????
?????
?????
???????????
????
14?????????????????ACDEFHGB??????????DECAHFBG???????????______?
HGFEDCBA
EDCHBGFA
BGFHEDCA
EDCBGHFA
BEGHDFCA
BGHFEDCA
15????????????????????????3?4?2?1?4?5?3?4?5?1?2????LRU???????????????S???3?4?????????????F?______?
S=3?F=6; S=4?F=5
S=3?F=7; S=4?F=6
S=3?F=8; S=4?F=5
S=3?F=8; S=4?F=7
S=3?F=10; S=4?F=8
S=3?F=11; S=4?F=9
16??????????????????????????500???????????????????????????????1????????????1%??????????????????______?
500?
510?
520?
530?
540?
?????
17??????????????????????????????????????????????????????A?B??????B?C????????A?C??????????????????????????????______?
????1????????????????
???2????????????????????????
???3???????????????????????????? ???????????????????????????????????????????????
??B???????????????????????????????? ???????????????????????
18????????const char str1[] = "abc";
const char str2[] = "abc";
const char *p1 = "abc";
const char *p2 = "abc";?????????????______?
str1?str2?????P1?P2?????
str1?str2?????P1?P2?????
str1?str2?????P1?P2?????
str1?str2?????P1?P2?????
4??????
???2016??????????????????
2016????????????c++???????[????????????]
#include<iostream>
#include<string>
#include<vector>
#include<set>
using namespace std;
//?C?????
class C{
public:
string cname;
public:
C(string cname){
this->cname=cname;
}
friend ostream& operator<<(ostream&count,C*cptr){
cout<<cptr->cname<<endl;
return count;
}
};
//?B??????
class B{
public:
string bname;
vector<B*> bbr;
vector<C*> bcr;
set<B*>*sbptr;
set<C*>*scptr;
public:
B(string bname){
this->bname=bname;
sbptr=new set<B*>();
scptr=new set<C*>();
}
friend ostream& operator<<(ostream&count,B*bptr){
cout<<bptr->bname<<endl;
return count;
}
//?????B??????
void listBptr(set<B*>*sbptr){//??????????????
if(bbr.size()>0){
for(auto bptr:bbr){
sbptr->insert(bptr);
bptr->listBptr(sbptr);
}
}
}
//????B???????
void getAllBptr(){
listBptr(sbptr);
}
void listAllBptr(){
getAllBptr();
cout<<bname<<"???????:"<<endl;
for(auto t:*sbptr){
cout<<t->bname<<endl;
}
}
//?????B?????
void listCptr(set<C*>*cbptr){
if(bcr.size()>0){
for(auto t:bcr){
cbptr->insert(t);
//cout<<"????:"<<t->cname<<endl;}
}
if(bbr.size()>0){
for(auto t:bbr){
t->listCptr(cbptr);
}
}
}
//????B???
void getAllCptr(){
listCptr(scptr);
}
void listAllCptr(){
getAllCptr();
cout<<bname<<"????????:"<<endl;
for(auto t:*scptr){
cout<<t->cname<<endl;
}
}
//??????????
void addBptr(B* bptr){
bbr.push_back(bptr);
}
//?????????
void addCptr(C*cptr){
bcr.push_back(cptr);
}
//?????????????
bool isBptrIn(B*bptr){
for(auto t:*sbptr){
if(bptr==t){
return true;
}
}
return false;
}
//????????????
bool isCptrIn(C*cptr){
for(auto t:*scptr){
if(cptr==t){
return true;
}
}
return false;
}
};
//?A????
class A{
public:
string aname;
vector<B*> abr;
vector<C*> acr;
set<B*>abptr;
set<C*>acptr;
public:
A(string aname){
this->aname=aname;
}
friend ostream& operator<<(ostream&count,A*aptr){ cout<<aptr->aname<<endl;
return count;
}
//?????A??????
void listBptr(){
cout<<"?????????:"<<endl;
for(auto t:abr){
abptr.insert(t);
}
for(auto bptr:abr){
bptr->getAllBptr();//?????
for(auto tt:*(bptr->sbptr)){
abptr.insert(tt);
}
}
for(auto t:abptr){
cout<<t->bname<<endl;
}
}
//?????A?????
void listCptr(){
cout<<"????????:"<<endl;
for(auto cptr:acr){
acptr.insert(cptr);
}
for(auto bptr:abr){
bptr->getAllCptr();//?????
for(auto tt:*(bptr->scptr)){
acptr.insert(tt);
}
}
for(auto t:acptr){
cout<<t->cname<<endl;
}
}
//??????????
void addBptr(B* bptr){
abr.push_back(bptr);
}
//?????????
void addCptr(C*cptr){
acr.push_back(cptr);
}
//?????????????
bool isBptrIn(B*bptr){
for(auto t:abr){
if(t->isBptrIn(bptr)){
return true;
}
}
return false;
}
//????????????
bool isCptrIn(C*cptr){
for(auto t:acr){
if(cptr==t){
return true;
}
}
for(auto t:abr){
if(t->isCptrIn(cptr)){
return true;
}
}
return false;
}
};
int main()
{
C a("??a"),b("??b"),c("??c"),d("??d"),e("??e");
B f("???f"),g("???g"),i("???i");
A h("??h");
f.addCptr(&a);f.addCptr(&b);f.addCptr(&c);
f.listAllCptr();
g.addCptr(&b);g.addCptr(&c);g.addCptr(&d);
g.listAllCptr();
i.addBptr(&f);
i.addBptr(&g);
//f.addBptr(&g);
//f.listAllBptr();
//??????????
//g.addBptr(&f);
//g.listAllBptr();
?2016???????(?????)?????????????
?????http://www.850500.com/news/6880.html
?????,??! |
|