Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write program in C language. 1. In this exercise you will write several functions that operate on strings (arrays of char types). Place all function
write program in C language.
1. In this exercise you will write several functions that operate on strings (arrays of char types). Place all function prototypes with documentation in a header file named string utils.h with their definitions in a source file named string utils.c You should test your functions by writing test cases and a driver program, but you need not hand it in Write a function to determine if a given string str contains a substring subStr. The function should return true if subStr appears anywhere inside str, false otherwise int strContains (const char *str, const char *subStr); Write a function that takes two strings and concatenates them together into a new string char concatenate (const char s, const char *t) Write a function that takes two strings, s and t and appends t to s returning the result as a new string char *append (const char *s, const char *t); Write a function that takes two strings, s and t and prepends t to s returning the result as a new string char *prepend (const char *s, const char *t); Write a function that takes a string and returns a new copy of a substring of it starting from a specified index to the end of the string. For example, if we pass in ("Nebraska", 3) it should return a new string containing "raska" char *substringToEnd (const char *s, int beginningIndex); Write a function that takes a string and returns a new copy of a substring of it starting from a specified index (inclusive) and going a specified ending index (exclusive). For example, if we pass in "Cornhuskers", 4, 10) it should return a new string containing "husker". char *substringIndex(const char s, int beginIndex, int endIndex)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started