30 likes | 63 Views
FOR MORE CLASSES VISIT<br>tutorialoutlet<br><br><br><br>Write a computer program which given two C-strings as input, checks if the first is asubstring of the second.You are supposed to allow whitespaces in the input strings. You program should interpreta new line as the end of first input string and similarly for the second input string.Note that if s1[0 . . . l1 − 1] and s2[0 . . . l2 − 1] are character strings of lengths l1 and l2respectively, we say that s1 is a substring of s2 if there exists an integer i, 0 ≤ i ≤l2 − (l1 − 1), such that s1[j] = s2[i j] for j = 0, . . . , l1 − 1For example, “obl” is a substring of “Problem 2”, but “oblm” is not a substring of“Problem 2”.
E N D
ECE 230 Write a computer program/tutorialoutletdotcom For more course tutorials visit tutorialoutletdotcom
ECE 230 Write a computer program which given two C-strings as input, checks if the first is asubstring of the second • FOR MORE CLASSES VISIT • Tutorialoutlet • Write a computer program which given two C-strings as input, checks if the first is asubstring of the second.You are supposed to allow whitespaces in the input strings. You program should interpreta new line as the end of first input string and similarly for the second input string.Note that if s1[0 . . . l1 − 1] and s2[0 . . . l2 − 1] are character strings of lengths l1 and l2respectively