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

Explain the advantages of computer, Explain the advantages of computer ...

Explain the advantages of computer Computer is one of the main components of an Information Technology network and getting increasing popularity. Nowadays, computer technology

Explain about programmer visible registers, Q. Explain about Programmer Vis...

Q. Explain about Programmer Visible Registers? Programmer Visible Registers: These registers can be employed by machine or assembly language programmers to minimize reference

What do you understand by hit ratio, What do you understand by Hit ratio? ...

What do you understand by Hit ratio? When a processor refers a data item from a cache, if the referenced item is in the cache, then such a reference is called hit. If the refer

Software engineering, how many errors will be left after defect amplificat...

how many errors will be left after defect amplification and removal method on the following data design=40 analysis=30 maintenance=20 testing 35 coding 25 take 75% removal efficie

Version control systems, The next major set of tasks to tackle are delete a...

The next major set of tasks to tackle are delete and update. Version control systems typically version updates to a ?le and only store the differences between the ?les. Two system

Unification, Unification: As just above this we have said that the rul...

Unification: As just above this we have said that the rules of inference for propositional logic detailed in the last lecture can also be required in first-order logic. Moreov

Define the analysis that determines the meaning of statement, Analysis whic...

Analysis which determines the meaning of a statement once its grammatical structure becomes known is termed as? Ans. The meaning of a statement when its grammatical structure b

Computer Architecture, As an advocate of CISC architecture to RISC architec...

As an advocate of CISC architecture to RISC architecture, what are the merits and demerits of CISC to RISC architecture

Explain ones complement operator, One's Complement Operator: ~ The one'...

One's Complement Operator: ~ The one's complement operator, sometimes called the "bitwise complement" or "bitwise NOT" operator, produces the bitwise one's complement of its op

Illustrate about the three state table buffers, Three state table buffers ...

Three state table buffers Three state table buffers: A bus system can be constructed with the help of three state gates instead of multiplexers. A three states gate is digital

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