Question 2: File I/O [8]

Write a function, named countChars, that takes a filename as a string parameter, opens the file, then counts and returns the number of characters in the file. It should return -1 if it was unable to open the file. The function should NOT contain any output statements.