How do you set the path for file handling in c?

1 answer

Answer

1051723

2026-03-26 04:25

+ Follow

file = fopen("numbers.txt", "r");

this way you can open a file in your working directory.

file = fopen("/home/student/numbers.txt", "r");

this way, you can give the path and open a file.but i don't know how search for a file and open it.if someone can help me...

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.