Question: Rewrite the following function so that it does not use any square brackets ( not even in the parameter declarations ) but does use the
Rewrite the following function so that it does not use any square brackets not even in the parameter declarations but does use the integer variable k Do not use any of the functions such as strlen, strcpy etc.
This function searches through str for the character chr
If the chr is found, it returns a pointer into str where
the character was first found, otherwise nullptr not found
const char findTheCharconst char str char chr
for int k ; strk; k
if strk chr
return &strk;
return nullptr;
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
