Question: What is wrong with the following code snippet? Language: C++ 1 const int BUF_SIZE = 1024; 2 char* buffer[1024] 3 FILE* file; 4 =
What is wrong with the following code snippet? Language: C++ 1 const int BUF_SIZE = 1024; 2 char* buffer[1024] 3 FILE* file; 4 = {0}; 5 if (file-fopen(filepath, "r")) { 6 fgets((char*) buffer, BUF_SIZE, file); 7 } 8 fclose(file);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
