Mail Archives: djgpp-workers/1998/07/20/07:08:40
Here's a DOS-/Windows-related quiz, for those who could use some
summer entertainment:
Assuming that foo.c exists and is a file (not a directory), what will
be the value of `i' after this line executes on DOS/Windows:
int i = access ("foo.c/.", F_OK);
Here are the terms of the contest:
1. You are NOT allowed to write a program to test this.
2. You may look at the sources in djlsr. Those who solve the quiz
without looking at the sources get extra points.
3. You must make a good-faith effort to approach the problem with an
open mind, and in particular NOT use the mere fact that I asked this
as a clue to a solution (a hard requirement, I know ;-).
4. You must provide an explanation of why do you think that particular
result will be obtained.
5. The solutions must reach me by this Thursday, no later than 16:00
GMT (for most fun, I suggest posting your solutions here), at which
point I will announce the correct solution and the winner, and will
also explain the background for the above.
Good luck, and have fun!
- Raw text -