#include <stdio.h>
char * getStringByPath(char *filePath);
int main() {
char *filePath = "D:/test/input.txt";
char *result = getStringByPath(filePath);
return 0;
}
char *getStringByPath(char *filePath) {
FILE *inputFile;
char *resultString = NULL;
errno_t err = fopen_s(&inputFile, filePath, "r");
if (!err) {
fscanf_s(inputFile, "%s", resultString, __crt_countof(resultString));
}
return resultString;
}