网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
If possible please suggest further improvement of the String class.
Question 3:
Given a link list, detect whether it's circular using only one loop.
Tips: Below implementation is allowed
for( ... )
{
...
}
The following implementations is NOT allowed
...
for( ... )
{
...
for( ... ) {...}
}
...
or
...
for( p = list->head, q = list->head; p != NULL && q != NULL; p = p->next )
{
...
}
...
for( ... )
{
...
}
参考答案
更多 “ If possible please suggest further improvement of the String class.Question 3:Given a link list, detect whether it's circular using only one loop.Tips: Below implementation is allowedfor( ... ){...}The following implementations is NOT allowed...for( ... ){...for( ... ) {...}}...or...for( p = list-head, q = list-head; p != NULL q != NULL; p = p-next ){...}...for( ... ){...} ” 相关考题
考题
下面的哪些程序段可能导致错误? ( ) Ⅰ: String s = "Gone with the wind"; String t = "good "; String k = s + t; Ⅱ: String s = "Gone with the wind"; String t; t = s[3] + "one"; Ⅲ: String s = "Gone with the wind"; String standard = s.toUpperCase(); Ⅳ: String s = "home directory"; String t = s-"directory":A.Ⅱ、ⅢB.Ⅱ、ⅣC.Ⅰ、ⅣD.Ⅲ、Ⅳ
考题
下列的哪个程序段可能导致错误? ( )A.String s="hello"; String t="good"; String k=s+t;B.String s="hello"; String t; t=s[3]+"one";C.String s="hello"; String standard=s.toUpperCase();D.String s="hello"; String t=s+"good";
考题
下列哪个程序段可能导致错误?A.String s="hello"; String t= "good"; String k=s+ t;B.String s="hello"; String t; t=s[3]+"one";C.String s="hello"; String standard=s. toUpperCaseD.String s="hello"; String t =s+ "good"
考题
下列语句能给数组赋值而不使用for循环的是A.myArray{[1]="One";[2]="Two";[3]="Three";}B.String s[5]=new String[]{"Zero", "One", "Two", "There", "Four"};C.String s[]=new String[]{"Zero", "One", "Two", "There", "Four"};D.String s[]=new String[]=|"Zero", "One", "Two", "There", "Four"};
考题
Simplify the following Boolean expression!((i ==12) || (j 15))struct Node {int value;Node* next;};1.1 Get the value of the Nth node from last node in the linked list.PARAM HEAD: the first element in the linked list:PARAM n: the number of the node counted reverselyRETURN: the value of the node, or -1 if not existsint GetValue(Node* HEAD, int n){}1.2 Delete a node WITHOUT using the HEAD pointer.PARAM p: A pointer pointed to a node in the middle of the linked list.RETURN: voidvoid Delete(Node* p){}1.3 Insert a new node before p WITHOUT using the HEAD pointerPARAM p: A pointer pointed to a node in the middle of the linked list.PARAM value: new Node valueRETURN: voidvoid Insert(Node* p, int value){}Question 2:Please write a String class with following features:
考题
Please make the implementation as simple as possible. Only help functions and classes fromstandard CC++ may be used to aid your implementation.
考题
下列语句能给数组赋值,而不使用for循环的是A.myArray{[1]="One";[2]="Two";[3]="Three";}B.String s[5]=new String[] {"Zero","One","Two","Three","Four"};C.String s[]=new String[] {"Zero","One","Two","Three","Four"};D.String s[]=new String[]= {"Zero","One","Two","Three","Four"};
考题
It is not possible to determine whether both continents are moving in opposite directions or whether one continent is stationary and the other is drifting away from it.
考题
Which statement about using McAfee and Webroot together is true?() A、it is not recommended: the system will not detect more malwareB、it is notpossible : the WSA will accept only one anti-malware licenseC、the system will stop all web-based threatsD、it is recommended: the system will detect more malware
考题
Which of the following IOS commands can detect whether the SQL slammer virus propagates in yournetworks?()A、access-list 100 permit any any udp eq 1434B、access-list 100 permit any any udp eq 1434 logC、access-list 110 permit any any udp eq 69D、access-list 110 permit any any udp eq 69 logE、None of above.
考题
For the following statements, which one is perceived as a drawback of implementing Fibre ChannelAuthentication Protocol (FCAP)?()A、It is restricted in size to only three segmentsB、It requires the use of netBT as the network protocolC、It requires the implementation of IKED、It relies on an underlying Public Key Infrastructure
考题
You are using AutoQoS Enterprise and realize that the results are not what you expected. Whichof the following are possible reasons for AutoQoS not functioning correctly?(Choose all thatapply.)()A、The interface you configured for AutoQoS is set to half-duplexB、AutoQoS was configured on only one end of the linkC、The interface you configured for AutoQoS has no IP addressD、The interface’s bandwidth is not correctly configuredE、CEF is not enabled on the interfaceF、You enabled AutoQoS on the interface but forgot to enable globally first
考题
Which one of the following describes who will be able to see an existing doc that contains a readers field ?()A、only those people listed in the access listB、anyone listed as a reader or above in the aclC、only those people list in the readers fieldD、anyone list as a reader or above in the acl and who is also list in the readers field
考题
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?()A、Every tag must have at least one tag.B、A tag can have many tags.C、A given tag can apply to only one tag.D、A given tag can contain from zero to many tags.E、It is possible to construct a valid tag such that,for a given resource,no user rolescan access that resource.
考题
For the following attempts, which one is to ensure that no one employee becomes a pervasive securitythreat, that data can be recovered from backups, and that information system changes do not compromisea system’s security?()A、Strategic security planningB、Disaster recoveryC、Implementation securityD、Operations security
考题
Which method implementations will write the given string to a file named "file", using UTF8 encoding?() IMPLEMENTATION a: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.write(msg); fw.close(); } IMPLEMENTATION b: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("file"), "UTF8"); osw.write(msg); osw.close(); } IMPLEMENTATION c: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.setEncoding("UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION d: public void write(String msg) throws IOException { FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION e: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter( new OutputStream(new File("file")), "UTF8" ); osw.write(msg); osw.close(); } A、Implementation a.B、Implementation b.C、Implementation c.D、Implementation d.E、Implementation e.
考题
Which of the following fragments might cause errors?() A、 String s = "Gone with the wind";String t = " good ";String k = s + t;B、 String s = "Gone with the wind";String t;t = s[3] + "one";C、 String s = "Gone with the wind";String standard = s.toUpperCase();D、 String s = "home directory";String t = s - "directory";
考题
Which of the following is an advantage of using virtualization to consolidate servers?()A、Reduced power and space requirementsB、Saves money on software costsC、Maintenance is easier because there is only one serverD、Fewer instances of the operating system to maintain
考题
单选题The TPC curve,one of the hydrostatic curves in a vessel’s plans,gives the number of tons().A
necessary to change the angle of list 1°at a given draftB
necessary to change trim 1 cm at a given draftC
pressure per square cm on the vessel's hull at a given draftD
necessary to further immerse the vessel 1 cm at a given draft
考题
单选题Which method implementations will write the given string to a file named "file", using UTF8 encoding?() IMPLEMENTATION a: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.write(msg); fw.close(); } IMPLEMENTATION b: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("file"), "UTF8"); osw.write(msg); osw.close(); } IMPLEMENTATION c: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.setEncoding("UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION d: public void write(String msg) throws IOException { FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION e: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter( new OutputStream(new File("file")), "UTF8" ); osw.write(msg); osw.close(); }A
Implementation a.B
Implementation b.C
Implementation c.D
Implementation d.E
Implementation e.
考题
多选题Which of the following fragments might cause errors?()AString s = Gone with the wind;String t = good ;String k = s + t;BString s = Gone with the wind;String t;t = s[3] + one;CString s = Gone with the wind;String standard = s.toUpperCase();DString s = home directory;String t = s - directory;
考题
单选题The author of the passage would be most likely to agree with which of the following statements about the Milankovitch theory?A
It is the only possible explanation for the ice ages.B
It is too limited to provide a plausible explanation for the ice ages, despite recent research findings.C
It cannot be tested and confirmed until further research on volcanic activity is done.D
It is one plausible explanation, though not the only one, for the ice ages.E
It is not a plausible explanation for the ice ages, although it has opened up promising possibilities for future research.
考题
单选题Which of the following sets of consonants differs only in one distinctive feature? _____A
[v][z][3][θ]B
[t][z][ʃ][ð]C
[s][v][ɜ][p]D
[p][d][z][S]
考题
单选题For the following statements, which one is perceived as a drawback of implementing Fibre ChannelAuthentication Protocol (FCAP)?()A
It is restricted in size to only three segmentsB
It requires the use of netBT as the network protocolC
It requires the implementation of IKED
It relies on an underlying Public Key Infrastructure
考题
单选题Which of the following IOS commands can detect whether the SQL slammer virus propagates in yournetworks?()A
access-list 100 permit any any udp eq 1434B
access-list 100 permit any any udp eq 1434 logC
access-list 110 permit any any udp eq 69D
access-list 110 permit any any udp eq 69 logE
None of above.
考题
单选题Which statement about using McAfee and Webroot together is true?()A
it is not recommended: the system will not detect more malwareB
it is notpossible : the WSA will accept only one anti-malware licenseC
the system will stop all web-based threatsD
it is recommended: the system will detect more malware
热门标签
最新试卷