Question: 9 . 5 LAB: Working with c - strings Write a C + + program that reads a sentence into a c - string of
LAB: Working with cstrings
Write a C program that reads a sentence into a cstring of maximum characters, a character into a variable called c and an integer into n and then passes all three of these variables to a function that searches for the character c and prints the character and the next n characters of the string, if the character is found. If it doesn't find the character in the string it must print "The character was not found. 'For example, if the user enters "Superbowl tickets are too expensive." and then enters t and the function must print tickets.
LAB
#include
using namespace std;
function definition here
int main
your program here
return ;
Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.
Predefine program input optional
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
