Not completed downloading of file (segmentation fault) while using curl on Ubuntu 14.04
char FILEPATH[3] = {path_pdf, path_jpg, path_txt};
Is an array of char
's (you want an array of strings), change to:
char *FILEPATH[3] = {path_pdf, path_jpg, path_txt};