answersLogoWhite

0


Best Answer

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...

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you set the path for file handling in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

You want a file handling c program?

yes


Is this a file path c documentsspring 2012cis 101term papercomputer technology is an example of a?

of a file name with path.


What is the difference between path name and file name?

A path name is the location of the file name. example: C:\Users\Desktop\Example.txt A file name is file itself. example: Example.txt


What is basic structure of file handling in c language?

open, read/write, close


What is file handling in c and c plus plus or objective c?

File handling is simply the process of opening, reading, writing and closing files. Files are simply streams for input and output, or the "serialisation" of objects. In other words, reading and writing data to and from disk storage.


What is the path and file name of DHCP server configuration file?


What is the default path for the folder where the active directory log file will be stored?

program file in c:\ drive


What is definition of file handling in c plus plus?

File is a place where information or data is stored. we make use of some of the file-handling functions in c like: fopen()-for opening a file. fclose()-to close a file. Every file being opened for any operations like: "r"- Read-Only mode. "w"-Write-only mode. "a"-append mode. "r+"-read+write mode. "w+"-write+read mode. "a+"-read+append mode. We should make use of FILE pointer ,in order to perform any such operations on the files. There are many input and output functions used along with files. fgetc() fgets() fscanf() fputc() fprintf() fputs() fseek() rewind() File handling is used to read or write a file without directly opening it.its contents are opened in another files by using above specified commands in c++ programming for file handling we have to use a header file but in c noheader file regarding to file handling is required


You want C program on students information record using file handling?

yes sir


You know that windows will be installed in the c drive windows folder what is the path to the answer file?

C:\windows\winn.sif


Why use pointer in c language with file handling?

Don't store pointers in files, it makes no sense.


What is the normal path of windows paging file used for virtual memory?

C:\pagefile.dat