Question: Assuming our program only has access to routines from the cstdio and cstring libraries, write the substrlen function described below. // ends searches the null-terminated
Assuming our program only has access to routines from the cstdio and cstring libraries, write the substrlen function described below. // ends searches the null-terminated character array stry // counting the number of characters before the first appearance // of the first char and also counting the number of characters after the last appearance // of the last char // it returns the sum of the two counts 1/ for example, the call substrlen("foo and blah", 'o', 'a') would // return 2 since there is one character before the first to // the last int ends (char str[l, char first, char last)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
