The First Code Fragment
fscanf (Fp, "%d",&Variable);
fseek (Fp, 2, SEEK_CUR); // Ignore <Enter>: 0x0D 0x0A (Windows Platform)
fread (&String, sizeof(char), Length, Fp);
The Second Code Fragment
fscanf (Fp, "%d\r\n",&Variable); // Ignore <Enter>: 0x0D 0x0A (Windows Platform)
fread (&String, sizeof(char), Length, Fp);
The Input File
13
Foobar
The first code can get the four white-blanks before Foobar, but the second can't.
Why? Thanks.
PS: If can, please help me rename the topic to make it more specific. Appreciate your help.