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 call by value and call by reference, Call by value and Call by refe...

Call by value and Call by reference Call by value means sending the values of the arguments- The value of each of the original arguments in the calling function is copied in

Explain about disk caching scheme, Q. Explain about disk caching scheme? ...

Q. Explain about disk caching scheme? The disk caching scheme can be used to speed up performance of disk drive system. A set (cache) of buffers is assigned to hold some disk b

What are the reasons for feedback in a control system, Question: a) Wha...

Question: a) What are the reasons for feedback in a control system? b) What are the roles of the configuration and fault managers in a real-time system? c) What are stimu

Bounded rationality in decision making, Q.What do you mean by the term 'bou...

Q.What do you mean by the term 'bounded rationality in decision making'? Maximizing the outcomes of a decision is an ideal stage. Habitually it is an impossible thing. The caus

What is unordered lists, Q. What is Unordered Lists? First, we will bui...

Q. What is Unordered Lists? First, we will build an unordered list. Many times, these lists are also termed as bulleted lists. These lists are characterized by list items which

Intel architecture – 64, IA-64 (Intel Architecture-64) is a 64-bit processo...

IA-64 (Intel Architecture-64) is a 64-bit processor architecture created in cooperation by Hewlett-Packard and Intel applied by processors like Itanium. The objective of Itanium wa

Cobol coding, What is cobol codin for heap sort?

What is cobol codin for heap sort?

Iterative deepening search, Iterative Deepening Search: So, breadth fi...

Iterative Deepening Search: So, breadth first search is always guaranteed to find a solution (if one exists), actually it eats all the memory. For the depth first search, ther

C language, Smugglers are becoming very smart day by day. Now they have dev...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

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