Here is how to assigns the correct string to initials:
initials <--- concat (prefix (FirstName, 1), prefix (lastName, 1))
Prefix functions are used in many string algorithms, including the KMP (Knuth-Morris-Pratt) string matching algorithm. KMP is the most popular substring search algorithm in linear time. This algorithm is used to find linear solutions over time for various problems involving strings, such as finding substrings in a string, number of unique substrings in a string, pattern matching problem, etc
To assign the correct string, we need to look at the "cancat ()" and "prefix ()" methods in this issue. The string consists of the first character of the string "firstName" followed by the first character of the string "lastName" and set to the initial letter of the variable.
Learn more about prefix function https://brainly.com/question/27099961
#SPJ4
*The questions above should be equipped with a choice of questions so that students can choose the answers provided by the question maker