0 like 0 dislike
26 views
in Computer Science by (1.0m points)
What is the use of EOF() function? Explain with program example.

1 Answer

0 like 0 dislike
by (1.0m points)
The Function EOF() that is used to check for the end of the file during the reading process.The EOF() function will return a value of false (0) if there are more records in the file,or it will return a value of true (1) if the end of the file has been encountred.Therefore,the EOF () function is actually evaluated like a Boolean expression.The argument send into the EOF() function will be the buffer number of the fle being manipulated.Because the EOF() is a Boolean expression that returns a value of true or false,it is an efficent way of controlling the excution of a loop during reading data from a file.For example,consider:

10 WHILE NOT EOF(1)

20 INPUT #1,stuName,gpa,grade

 30 PRINT"STUDENT:";stuName;spc(5);gpa;SPC(5);grade

40 While

Related questions

0 like 0 dislike
0 answers 33 views
0 like 0 dislike
1 answer 29 views
0 like 0 dislike
1 answer 45 views
0 like 0 dislike
0 answers 38 views
0 like 0 dislike
1 answer 111 views
0 like 0 dislike
1 answer 45 views
asked Nov 9, 2018 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 51 views
0 like 0 dislike
1 answer 28 views
0 like 0 dislike
1 answer 21 views
0 like 0 dislike
1 answer 78 views
asked Feb 9, 2019 in Computer Science by danish (1.0m points)
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute: School, College, University, Academy Free Homework Help

19.4k questions

18.3k answers

8.7k comments

3.3k users

Free Hit Counters
...