electroRF
Member
Hi,
Could you tell me please why this code only prints the first word of the file?
char str[50];
FILE* pFile;
pFile = fopen("myFile.txt", "r");
if (NULL != pFile)
{
fgets(pFile, str);
printf("The first word in the file is %s\n", str);
fclose(pFile);
}
---
I got additional question please.
is it possible to move files from one directory to another with C?
Could you tell me please why this code only prints the first word of the file?
char str[50];
FILE* pFile;
pFile = fopen("myFile.txt", "r");
if (NULL != pFile)
{
fgets(pFile, str);
printf("The first word in the file is %s\n", str);
fclose(pFile);
}
---
I got additional question please.
is it possible to move files from one directory to another with C?
Last edited: