dsGet number of lines in a file c++ This C++ Program which counts the number of lines in a file. The program creates an input file…byJohn