Question :
(a) Define a Pointer. Provide an example of an integer pointer variable.
(b) Give advantages of using pointers over arrays.
(c) Declare an integer pointer variable called ‘array_ptr'. Now prepare the code fragment to read in ten integer values from a user. Here the value entered by the user must be stored in an array of pointers.
(d) Declare an integer array called ‘arrayInt'. Now prepare the code fragment to read in ten integer values from a user. Here all the values are stored in the integer array.
(e) (i) What is the purpose of the buffer area when working with a stream oriented data file?
(ii) How is a buffer area defined?
(f) Prepare a code fragment to open a data file called "inputfile.txt" in read only mode and that also checks whether the file is correctly opened or not.