Question 1: File I/O and command line arguments [ 16 marks ]

Write a complete C++ program that satisfies the following requirements:

it accepts two command line arguments
if too few arguments are provided 
   the program displays an error message and exits
otherwise
   the first argument is treated as the name of an input file,
   the second argument is treated as an integer value, 
      referred to as N below
   the program attempts to open the file for reading 
      if the open succeeds 
         it reads the first N characters from the file, 
         displaying them on the screen (ALL characters count)
   once N characters have been displayed or the end of the file is reached 
         the program should close the file and exit