Practice · 2 of 3
Write Then Read
CHALLENGE
Difficulty: beginner+25 XP
Implement int echo_file(const char *path, const char *text): write text to path (mode "w"), then read the WHOLE file back and return the number of characters stored. Any open failure returns -1.
Press Submit to check your solution.
Back to lesson: Practice: File Workbench