# define size_of_files 100
char* file_paths[size_of_files];
for(int file_path_idx = 0; file_path_idx < N; file_path_idx++)
{
file_paths[file_path_idx] =(char*)malloc(strlen(fpath)+1);
strcpy(file_paths[file_path_idx],fpath);
}
How to have malloc for file_paths array at ones not for every idx in file_path what i need is to have file_paths[file_path_idx] =(char*)malloc(strlen(fpath)+1); above the for loop and rhe strcpy will work fine?