Quiz 3: Manipulating Strings
Computing
Free
True False
False
Q 2Q 2
The concatenation operator (.) combines several string variables and literal strings and assigns the new value to another variable.
Free
True False
True
Free
True False
True
Q 4Q 4
An escape character tells the compiler or interpreter to exit the program at the escape character.
Free
True False
Q 5Q 5
Placing a backslash in front of an apostrophe tells the PHP scripting engine that the apostrophe is to be treated as a regular keyboard character.
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Q 12Q 12
The term parsing refers to the act of dividing a string into logical component substrings or tokens.
Free
True False
Q 13Q 13
The strpos() function performs a case-sensitive search for specified characters in a string and returns the position of the first occurrence of a substring within a string.
Free
True False
Q 14Q 14
The strchr() function or strrchr() function return a substring from the specified characters to the end of the string.
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Q 20Q 20
The strcasecmp() function and the strcmp() function respectively perform a case-insensitive and case-sensitive comparison of strings.
Free
True False
Q 21Q 21
The levenshtein() function returns the number of characters you need to change for two strings to be the same.
Free
True False
Free
True False
Q 23Q 23
A megaphone is an algorithm that returns a code for indexing words by their sound, when pronounced in English
Free
True False
Q 24Q 24
Regular expressions are patterns that are used for matching and manipulating strings according to specified rules.
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Free
True False
Q 31Q 31
The concatenation operator in PHP is a ____.
A) plus sign (+)
B) period (.)
C) minus sign (-)
D) question mark (?)
Free
Multiple Choice
Q 32Q 32
In PHP, the escape character is the ____.
A) pipe (|)
B) period (.)
C) semicolon(;)
D) backslash(\)
Free
Multiple Choice
Free
Multiple Choice
Free
Multiple Choice
Free
Multiple Choice
Q 36Q 36
A structure in which variables are placed within curly braces inside of a string is called a ____.
A) complex string syntax
B) simple string syntax
C) function
D) method
Free
Multiple Choice
Q 37Q 37
The strlen() function returns the total ____ in a string.
A) number of numerals
B) number of characters
C) number of occurrences
D) number of words
Free
Multiple Choice
Q 38Q 38
The most commonly used string counting function is the ____ function, which returns the total number of characters in a string.
A) str_count()
B) strlen()
C) strpos()
D) total()
Free
Multiple Choice
Q 39Q 39
The ____ function converts all of the letters in a string to capital letters.
A) strtoupper()
B) stringtoupper()
C) strtolower()
D) stringtolower()
Free
Multiple Choice
Q 40Q 40
The ____ function converts any occurrence of (&), ("), ('), (<), and (>) to their equivalent HTML character entity.
A) converttohtml()
B) specialhtml()
C) htmlspecialchars()
D) convertchars()
Free
Multiple Choice
Q 41Q 41
The ____ function uses a strong encryption algorithm called Message-Digest Algorithm to create a one-way hash of an entered string.
A) strhash()
B) str-ireplace()
C) mda()
D) md5()
Free
Multiple Choice
Q 42Q 42
The ____ function will remove both leading and trailing spaces from a string.
A) ltrim()
B) rtrm()
C) trim()
D) strtrim()
Free
Multiple Choice
Q 43Q 43
The ____ function randomly scrambles the order of characters in a string.
A) str_scramble()
B) str_shuffle()
C) str_jumble()
D) str_random()
Free
Multiple Choice
Q 44Q 44
The ____ function splits a string into an indexed array.
A) repair()
B) implode()
C) explode()
D) strtok()
Free
Multiple Choice
Free
Multiple Choice
Q 46Q 46
The strcmp() function performs a ____ comparison of two strings.
A) case-insensitive
B) standard
C) case-sensitive
D) sub-standard
Free
Multiple Choice
Q 47Q 47
The similar_text() function returns the number of ____ to strings have in common.
A) characters
B) words
C) numbers
D) sounds
Free
Multiple Choice
Q 48Q 48
____ are special characters that define the pattern matching rules in a regular expression.
A) Specialchars
B) Patterncharacters
C) Expressionchars
D) Metacharacters
Free
Multiple Choice
Q 49Q 49
In a regular expression, a(n) ____ specifies that the pattern must appear at that position in the string.
A) pointer
B) anchor
C) position
D) spotter
Free
Multiple Choice
Q 50Q 50
The metacharacter, ____, specifies an anchor at the end of the line.
A) (\)
B) (&)
C) (^)
D) ($)
Free
Multiple Choice
Q 51Q 51
The ____ quantifier specifies that zero or more of the preceding characters can match.
A) (&)
B) (*)
C) (#)
D) (?)
Free
Multiple Choice
Q 52Q 52
____ quantifiers allow you to more precisely specify the number of times a character must repeat sequentially.
A) Curly brace
B) Curly bracket
C) Parentheses
D) Double quotation marks
Free
Multiple Choice
Q 53Q 53
The characters contained in a set of parentheses within a regular expression are referred as a ____.
A) subpattern
B) basepattern
C) nested pattern
D) base expression
Free
Multiple Choice
Q 54Q 54
The ____ metacharacter is used to specify a range of values in a character class.
A) (-)
B) (+)
C) (@)
D) (')
Free
Multiple Choice
Q 55Q 55
The ____ metacharacter is used to allow a string to contain an alternate set of substrings.
A) (!)
B) (|)
C) (\)
D) (/)
Free
Multiple Choice
Free
Short Answer
Free
Short Answer
Q 58Q 58
The escape character combined with one or more other characters is called a(n) ____________________.
Free
Short Answer
Q 59Q 59
Using a ____________________ escape sequence at the end of an echo statement makes XHTML code easier to debug and read.
Free
Short Answer
Q 60Q 60
____________________ syntax allows you to use the value of a variable inside a text string enclosed by double quotation marks.
Free
Short Answer
Q 61Q 61
The argument you pass to the strlen() function is a literal string or string variable whose ____________________ you want to count.
Free
Short Answer
Q 62Q 62
The ucfirst() function and the lcfirst() function only change the ____________________ character of a string.
Free
Short Answer
Q 63Q 63
A()n) ____________________ hash is a fixed length string based on the entered text from which it is almost impossible to determine the original text.
Free
Short Answer
Free
Short Answer
Q 65Q 65
The ____________________ function is can be used to check for palindromes because it reverses the characters in a string.
Free
Short Answer
Q 66Q 66
The ____________________ functions do not modify the contents of an existing string; instead they return a new string, which is assigned to a variable.
Free
Short Answer
Q 67Q 67
The strtok() function is used to break a string into smaller strings, called ____________________.
Free
Short Answer
Free
Short Answer
Q 69Q 69
The strncmp() function and the strncasecmp() function contain a third argument specifying the ____________________ of characters to compare in the string.
Free
Short Answer
Q 70Q 70
____________________ are patterns that are used for matching and manipulating strings according to specified rules.
Free
Short Answer
Q 71Q 71
Regular expressions consist of literal characters and ____________________, which are special characters that define the pattern matching rules in an expression.
Free
Short Answer
Q 72Q 72
A(n) ____________________ metacharacter in a regular expression pattern specifies that the pattern must contain a value where the metacharacter is located.
Free
Short Answer
Q 73Q 73
A(n) ____________________ specifies that a pattern must appear at that position in the string.
Free
Short Answer
Free
Short Answer
Q 75Q 75
The ____________________ quantifier specifies that the preceding character in the pattern is optional.
Free
Short Answer
Q 76Q 76
The ____________________ quantifier specifies that one or more sequential occurrences of the preceding characters match.
Free
Short Answer
Q 77Q 77
Characters contained in a set of parentheses within a regular expression are referred to as a subexpression or ____________________.
Free
Short Answer
Q 78Q 78
Any characters included in a ____________________ class represent alternate characters that are allowed in a pattern match.
Free
Short Answer
Q 79Q 79
The ____________________ metacharacter is used to specify a range of values in a character class.
Free
Short Answer
Q 80Q 80
The circumflex character (^) used in a character class specifies ____________________ characters to exclude in a pattern match.
Free
Short Answer
Q 81Q 81
To include a literal hyphen (-) in a character before the closing bracket or it will interpreted as a ____________________.
Free
Short Answer
Q 82Q 82
PCRE includes special character types, such as the ____________________ expression to allow any alphanumeric characters and the underscore character.
Free
Short Answer
Q 83Q 83
To allow a string to contain an alternate set of substrings, you separate the strings in a regular expression pattern with the pipe (|) metacharacter, which is similar to the ____________________ operator.
Free
Short Answer