16 There are two strings p and q, q is p’s substring. The algorithm to search the first time q appeared in p is called ( )
A. Seeking substring
B. Concatenation
C. Matching
D. Seeking length
查看答案
17 Which of the following statements is correct?
A. “Empty string” is blank string.
B. Empty string is a substring of arbitrary string.
C. String only can be stored in sequential method and cannot be stored in linked method.
D. In C++ standards, char S[M] can represent up to a string of length M.
18 If the string S1 = 'ABCDEFG', S2 = '9898', S3 = '###', S4 = '012345', execute concat (replace (S1, substr (S1, length (S2), length (S3)), S3), substr (S4, index (S2, '8'), length (S2))) Note substr (S, i, j) is the operation to take string S’s j characters from subscript i. Subscript here is starting from 0.(There is only one correct answer)
ABC###G0123
B. ABCD###2345
C. ABCD###1234
D. ABC###G2345
19 Which of the following descriptions about string is incorrect ?
A. String is a finite sequence of characters.
B. Pattern matching is an important operation.
C. String is a linear list whose data objects and operations both special
D. Empty string is a string consisting of spaces.
2 There is an array A[i, j], the length of each element is 3 bytes, the value of i is 1 to 8, the value of j is 1 to 10. The first address of the array is BA, with row-major order, the address of element A[5,8] is ( ).
A. BA+141
BA+180
C. BA+222
D. BA+225