What is meant by opening a data file, Computer Engineering

Assignment Help:

What is meant by opening a data file

A data file is a file that can be read from or written to. Data files are particularly useful when large amounts of data are involved. Each line of a data file is called a record. The following is the first few records of the file ospots.dat (a file containing the total number of sunspots observed in a year during the years 1850-1975):

1850 66.6

1851 64.5

1852 54.1

1853 39.0

1854 20.6

To read from or write to a data file during the execution of a program, the file must first be opened with the function  "fopen". This function takes two arguments - the first one is the path to your file, including the filename. So if your file sits in the same directory as your C source file, you can simply enter the filename in here .   The second argument is another char *, and determines how the file is opened by your program. Finally, fopen returns a FILE pointer if the file was opened successfully, else it returns NULL.

 

 


Related Discussions:- What is meant by opening a data file

Input, what is an input?

what is an input?

Explain e-mail gateways, Explain E-mail gateways. Email using SMTP work...

Explain E-mail gateways. Email using SMTP works better while both the sender and the receiver are on the Internet and can support TCP connections among sender and receiver. Tho

What are the features of cisc processors, What are the Features of CISC Pro...

What are the Features of CISC Processors The standard features of CISC processors are listed below:  CISC chips have a large amount of dissimilar and complex instructions.

What are program-invisible registers, What are program-invisible registers?...

What are program-invisible registers? Ans: the local and global descriptor tables are found in the memory system. To access and specify the address of these tables, program inv

Hard-disk acquisition, Problem (a) Forensic methodology consists of t...

Problem (a) Forensic methodology consists of three phases. Briefly explian these three phases. (b) Sometimes it's best not to perform hard-disk acquisition. Provide two

Digital Design, Design a serial 2’s complementer with a shift register and ...

Design a serial 2’s complementer with a shift register and a flip-flop

Using the memory map design an absolute decoding circuit, Using the memory ...

Using the memory map below; design an absolute decoding circuit.   The technique is to spot the differences between the start and stop of each device. The Ram chip has the follow

The average height or weight, A script kept information on potential subjec...

A script kept information on potential subjects for an experiment in a vector of structures known as "subjects".  The following show an example of what the contents may be: >> subj

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd