Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a subroutine that takes thesegment and offset pairs for two null terminate

ID: 3616052 • Letter: W

Question

Write a subroutine that takes thesegment and offset pairs for two null terminated strings. If thefirst string is present anywhere inside the second string, thesubroutine returns 1 in AX and otherwise it returns 0.

For example, if the first string is"cde" and the second is "abcdef", the subroutine returns 1. Ifhowever the second string is "abcd", the subroutine returns 0. Becareful about the lengths of strings and never access beyond thenull byte at the end of string. Do check your subroutine with "aab"as the first string and "aaab" as the second. Since "aab" is asubstring of "aaab", your subroutine should return 1.

Explanation / Answer

x.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote