Question: Write a program to fix the errors mentioned. Your program should 1. Change the data type flag to VDT_INT (not VDT_DBL) 2. Change the 26th
Write a program to fix the errors mentioned. Your program should
1. Change the data type flag to VDT_INT (not VDT_DBL)
2. Change the 26th data array entry to be 25 (not -1)


#include #include = = typedef enum { VDT INT = 1, VDT_FLT, VDT DBL } VEC_DATA_TYPE; int main() { FILE* p_file = fopen("vector.dat", "rb"); if (p_file != NULL) { printf("p_file %p ", p_file); printf("file pos =' %id "; fte(p_file)); // read the file format signature (9 bytes) char fmt_sig[9] : fread(fmf_sig, sizeof(char), o, p_file); printf("fmt_sig: %s ", fmt_sig); printf("file pos = %d ", ftel(p_file)); // read the data type (4 bytes) VEC_DATA_TYPE data_type; fread(&data_type, sizeof(data_type), 1, p_file); printf("data_type: %d ", data_type); printf("file pos = %ld ", fteli(p_file)); // read the length (4 bytes) int len = 0; fread(&len, sizeof(len), 1, p_file); printf("len: %d ", len); printf("file pos %d ", ftell(p_file)); // read the data (len*4 or len*8 bytes) switch (data_type) { case VDT_INT: { int data[len]; fread(data, sizeof(int), len, p_file); for (int idx 0; idx #include = = typedef enum { VDT INT = 1, VDT_FLT, VDT DBL } VEC_DATA_TYPE; int main() { FILE* p_file = fopen("vector.dat", "rb"); if (p_file != NULL) { printf("p_file %p ", p_file); printf("file pos =' %id "; fte(p_file)); // read the file format signature (9 bytes) char fmt_sig[9] : fread(fmf_sig, sizeof(char), o, p_file); printf("fmt_sig: %s ", fmt_sig); printf("file pos = %d ", ftel(p_file)); // read the data type (4 bytes) VEC_DATA_TYPE data_type; fread(&data_type, sizeof(data_type), 1, p_file); printf("data_type: %d ", data_type); printf("file pos = %ld ", fteli(p_file)); // read the length (4 bytes) int len = 0; fread(&len, sizeof(len), 1, p_file); printf("len: %d ", len); printf("file pos %d ", ftell(p_file)); // read the data (len*4 or len*8 bytes) switch (data_type) { case VDT_INT: { int data[len]; fread(data, sizeof(int), len, p_file); for (int idx 0; idx