Question 1:
(a) Describe the following objects and condition states:
(i) ifstream and ofstream objects
(ii) eof(), fail(), bad() and good() functions.
(b) Write a C++ program that reads all data from the file mydata.txt, containing integer numbers, and display them on the screen.
Question 2:
(a) Briefly describe how a linear search algorithm works.
(b) Write a C++ program that will allow a user to search an integer number from a list of numbers using a linear search method.