Question: skeleton code for problem 1: For this lab, please only write the required function. Please use the skeleton code is problemn.h and problemn.cpp, where n

skeleton code for problem 1:

For this lab, please only write the required function. Please use the skeleton code is "problemn.h" and "problemn.cpp", where n is the problem number. For problem 1, we will provide problem1.h and problem1.cpp with initial function prototypes. Simply fill in the code an submit the final version. If you need to write helper functions, please include them in the "problemn.cpp" file and be sure to add their function prototype to the "problemn.h" file. Problem 1 Given a text txtt0..n-1] and a pattern pat[0.m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat in txtJ. You may assume that n > m. Input: txt[] -"THIS IS A TEST TEXT" Output: Pattern found at index 10 Input: txt[] - "AABAACAADAABAABA" Output: Pattern found at index 0 pat[ "TEST" pat"AABA" Pattern found at index 9 Pattern found at index 12 9 lines (7 sloc) 140 Bytes 1 2 #include "problemi . h.. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
