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

State the difference between following, Q. State the difference between fo...

Q. State the difference between following. i. RAM and ROM ii. SRAM and DRAM iii. Dynamic and static MOS memories

Double negation - artificial intelligence, Double Negation - Artificial int...

Double Negation - Artificial intelligence: Always parents are correcting their children for the use of double negatives, but we have to be very alert with them in natural langu

Cohesion assignments, what can be different assignments given on this topic...

what can be different assignments given on this topic?

Find 9''s compliment of bcd number using 4-bit binary adder, Design a circu...

Design a circuit for determining the 9's compliment of a BCD number by using 4-bit binary adder and some external logic gates? Compliment of a BCD number 9's co

By which except ions of type error in java are handled, Except ions of type...

Except ions of type error in JAVA are handled by? Except ions of type error in the JAVA are handled through JAVA run time environment.

Nmknl''knl, Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Explain public switched telephone network, Explain Public Switched Telephon...

Explain Public Switched Telephone Network. PSTN (Public Switched Telephone Network): This is Public Switched Telephone Network (PSTN), which accommodates two types of subscri

Difference between shadow and override in programming, Overriding tell us o...

Overriding tell us only the methods, but shadowing tells us the entire element.

Basic tradeoff of concerns for instruction set design, Q. Basic Tradeoff of...

Q. Basic Tradeoff of concerns for instruction set design? Basic Tradeoff: Smaller instruction (less space) vs. desire for more powerful instruction repertoire. Generally p

How is the connectivity established in verilog, How is the connectivity est...

How is the connectivity established in Verilog when connecting wires of different widths? When connecting wires or ports of different widths, connections are right-justified, S

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