Problem Statement
Exercise 1-7: Write a program to print the value of EOF.Solution
#include <stdio.h> int main() { printf("Value of EOF is %d\n", EOF); return 0; }
Output of the above program is
Value of EOF is -1
Hence the value of EOF is -1.
Links
Next Article - K&R Exercise 1.8 Write a program to count blanks, tabs and newlinesPrevious Article - K&R Exercise 1.6 Expression getchar() != EOF
All Article - K & R Answers
No comments :
Post a Comment