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

1. Write a C program pattem.c that includes a main program and a function with t

ID: 3774932 • Letter: 1

Question

1. Write a C program pattem.c that includes a main program and a function with the following function prototype: int contains const char text, const char pattern The main program. must test the function by calling it with 5 different values for text and pattern and printing the results to the screen using the following fomat string: "Pattern s occurs in Ss at the location $d.In" The function accepts two text strings, text and pattern as input. It then determines the location of the specified pattern string in the text string. Lf the pattern occurs multiple times, it returns the first occurrence of the pattern and ifit does not occur, then the function retums l. For example, if called with the text Hello, World!" and the pattern "orl", the function 5 points) 2. Write a C program coding.c that includes a main program and two functions with the following function prototypes void encodestr (char input, char routput, CodeT code void decodestr char Kinput, char output, codeT code The first function takes the input string in input and generates the encoded string using the information in code. The result is stored in output. The second function takes the input string in input and decodes it back using the information in code. The result is stored in output again.

Explanation / Answer

fast prototyping involves a couple of iterations of a 3-step manner:
Prototype
Convert the users’ description of the answer into mock-ups, factoring in person enjoy requirements and high-quality practices.
evaluation
share the prototype with users and compare whether or not it meets their needs and expectancies.
Refine
based totally on comments, identify areas that need to be subtle or in addition described and clarified.