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

What are the 3 segments of the default route, What are the 3 segments of th...

What are the 3 segments of the default route, that is there in an ASP.NET MVC application? Ans)  Segment 1st - Controller Name Segment 2nd - Action Method Name Segment 3r

Efficiency - metrics for performance evaluation, Q. Efficiency - Metrics fo...

Q. Efficiency - Metrics for performance evaluation? The other significant metric employed for performance measurement is efficiency of parallel computer system it implies that

What are preprocessor directives, What are preprocessor directives? Pre...

What are preprocessor directives? Preprocessor directives: These are the commands given to a program called as pre-processor that processes the source code before it passes by

The components of i-way infrastructure, What are the components of I-way In...

What are the components of I-way Infrastructure? There are three mechanism of the I-way infrastructure: Consumer access equipment Local on-Ramps Global informa

Difference between the testing and verification, Difference between the tes...

Difference between the testing and verification. Verification proves conformance with a specification. Testing tries to find cases where the system does not meet its specifi

State and prove demorgan's second theorem, State and prove Demorgan's secon...

State and prove Demorgan's second theorem   Proof: Demorgan's second theorem   = A‾ + B‾ The two sides of the equation here   = A‾ + B‾ is represented through the logic d

How to maintain lists, How to maintain lists? To return from a high li...

How to maintain lists? To return from a high list level to the next-lower level (SY-LSIND), the user chooses back on a secondary list.  The system then gives the currently dis

Memory cache hierarchy and virtual memory system, 1. Detail for each of the...

1. Detail for each of the four following MIPS instructions, which actions are being taken at each of their five steps. Do not forget to mention how and during which steps each inst

What is middleware net dynamics, NetDynamics Application Server was the pri...

NetDynamics Application Server was the primary Java-based integrated software platform. The product was developed by NetDynamics Inc. As Java became the dominant development langua

Network, Give an intuitive explanation of why the maximum throughput, for s...

Give an intuitive explanation of why the maximum throughput, for small beta, is approximately the same for CSMA slotted Aloha and FCFS splitting with CSMA. Show the optimal expecte

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