Question: can we use fgets in c++?
Answer: fgets() prototype char* fgets(char* str,int count,FILE* stream); The fgets() function reads a maximum of count-1 characters from the given file stream and stores them in the array pointed to by str . The parsing continues until the end of file occurs or a newline character (\n) is found.