Question Create a method that 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). Explanation findTheChar method has 2 parameters, an array of char, which is the c style string, and chr, which…