Question: Write the following function in C++ programming language: char *read_file(const char *filename) It will make POSIX calls in Linux to read file name contents from
Write the following function in C++ programming language:
char *read_file(const char *filename)
It will make POSIX calls in Linux to read file name contents from the disk to be stored in a null-terminated character array via a C-style string
The array will need to be allocated dynamically
Pointers to arrays will be returned
Caller is necessary to free memory allocation for the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
