Exercise 1.7 - Value of EOF

Question

Write a Program to print the value of EOF.

Solution

Explanation

1. Since EOF is an integer, we can print it with %d format in the printf. 2. EOF value is printed as -1.