CAPE Computer Science Unit 1 · 2009 · Paper 2 · Question 5(c)
Write a complete C program that prompts the user for 10 integers and writes them into a text file 'in.dat' (one per line), closes the file, reopens it, computes and prints the average of the integers, and outputs an appropriate error message if the file cannot be opened. Do not use arrays.
The mark scheme is shown once you've answered.
Practise this question