球迷网直播nba :Ƕʽ̎Pԇ}Ŀ

rg2017-09-06 Pԇ}Ŀ ҪͶ

nbaֱ www.oivyya.tw Ƕʽָ̎C/C++ZRZԵȻAϤģMӼgӲ֪R˽̎wϵYǶʽϵyOӋ_lӲϵyĽPܛ_lֲ{ԇȹСǶʽ̎Pԇ}ĿՈ

Ƕʽ̎Pԇ}Ŀ1

1һlL31,гɔ,ʹеһλ׶܉ӳL131κĽl,ՈҪЎ״?

A.4

B.5

C.6

D.7

𰸣A

2\ڶ̎ϵLinuxh,R^dz,ҲSГQr,ʹķNCƝM?

A.SpinLock

B.Mutex

C.Semaphore

D.Condition variable

𰸣A

3³ݔĽY()

#include

int main(){

int x=10,y=10;

printf("%d %d",x--,--y);

}

A.10 10

B.9 9

C.9 10

D.10 9

𰸣D

4EDŽM횵IJE?

A.{ȳM̷CPU

B.һM̿ƉK

C.M̷ȴ

D.M̿ƉK;w

𰸣A

5,__()

A.^ǻеpublicɆTpublic

B.^ǻеprivateɆTprivate

C.^ǻеprotectedɆTprotected

D.˽^ǻеpublicɆTprivate

𰸣ACD

6int listen(SOCKET s, int backlog);ԓеڶĺx?

A.Ƿ_logϢ

B.Ƿ__logϢ

C._ȴBеֵ

D._ȴBеСֵ

𰸣C

7JavaеQcԓļͬ

A.

B.e

𰸣B

8ܛ?[Ҫԭ퍅ļ?

?ӛ]ʹò?Ӳɿ یܛe`JR ȱõ_lֶ ܛc _lЧʵ

A.(٢ڢ)

B.(ڢۢ)

C.(ۢݢ)

D.(ܢݢ)

:D

9Ђhibernatetdfe`?

A.Hibernate2tdFa)w b)(Collection)

B.Hibernate3 ṩˌԵtd

C.get֧tdload֧t

D.hibernateʹJavaCֹa팍F͸

:C

10_?ĹܺĽӿo`RlǸxFYɵ?

A.

B.ҪOӋ

C.ԔOӋ

D.a

:B

Ƕʽ̎Pԇ}Ŀ2

1Pservletinit,service,destroye`?

A.init()servletcһdijservlet{init()

B.Service()̎͑ClՈ

C.destroy()־servletڵĽY

D.servletڶྀʹͬCڲlservletǾ̰ȫ

𰸣D

2Pjavac++e`?

A.javaһξ̎\c++һξ̎g

B.c++javaֶ֧س

C.Javaֲ֧ddJc++ͻ

D.java]кָᘙCc++ָֺ֧

𰸣B

3()OӋģʽ󲿷cČFx

A.Singleton()

B.Bridge()

C.Composite(M)

D.Facade(^)

𰸣B

4ЩOӋģʽǽYԴʹʣ

A.prototype

B.singleton

C.flyweight

D.abstract factory

𰸣BC

5\ڶ̎ϵLinuxh,R^dz,ҲSГQr,ʹķNCƝM?

A.SpinLock

B.Mutex

C.Semaphore

D.Condition variable

𰸣C

6UnixϵyЩMgͨ?()

A.Socket

B.ȴ

C.Ϣ

D.̖

𰸣ABCD

7һЩYԴԼBIJDZڵĂM?

A.onPause()

B.onCreate()

C.onResume()

D.onStart()

𰸣A

8androidʹMenurҪ،ķ?

A.onCreateOptionsMenu()

B.onCreateMenu()

C.onOptionsItemSelected()

D.onItemSelected()

:AC

}

1һǰһcharMɵַѭhnԭǡabcdefghin=2λԓǡhiabcdefgh ^@ӵģ

//pStrָ'\0'Yβַָ

//stepsҪƄӵn

void LoopMove ( char * pStr, int steps )

{

//Ո...

}

_1

void LoopMove ( char *pStr, int steps )

{

int n = strlen( pStr ) - steps;

char tmp[MAX_LEN];

strcpy ( tmp, pStr + n );

strcpy ( tmp + steps, pStr);

*( tmp + strlen ( pStr ) ) = '\0';

strcpy( pStr, tmp );

}

_2

void LoopMove ( char *pStr, int steps )

{

int n = strlen( pStr ) - steps;

char tmp[MAX_LEN];

memcpy( tmp, pStr + n, steps );

memcpy(pStr + steps, pStr, n );

memcpy(pStr, tmp, steps );

}

@ԇ}Ҫԇߌ˜ʎ캯쾚̶ҪĕrÎ캯Ժ̶ܴϺ򾎌Ĺ

lʹõĎ캯

(1) strcpy

(2) memcpy

(3) memset

2ܛyԇԓ֎ׂA?AΑcyԇc?Aεĺx?

:

wρfɷ֞Ԫyԇ,ɜyԇ,ϵyyԇ,՜yԇ,ÿAַ֞傀E: yԇӋyԇOӋOӋнYyԇ

ʼyԇÿ?{?CԴa_ԓAγɞԪyԇҪð׺Мyԇ ?鼯ɺD҆Tp?ɜyԇCͳ򘋳Ɇ}ҪúںМyԇo֮԰׺Мyԇ

ܛɺҪɴ_Jϵyyԇ_JyԇṩܛMйC_JyԇHHúںМyԇ

P