answersLogoWhite

0


Best Answer

It's -1, but in theory could be something else on some exotic platforms, but still negative. See the related links below for further information.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: WHAT IS EOF value in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is ascii value of EOF?

There is no ascii value for EOF. The constant EOF is a special value, not representing any character, but indicating an eof-of-file or error condition when using stream I/O. On the other hand, there is an ascii charactor end-of-file, <CTRL>Z, 26, or 0x1A which, in the DOS era, indicated the end of file in a text file, but this is not the same as the run-time library constant EOF.


What loops does not need a counter?

Random example: while ((c= getchar()) != EOF) putchar (c);


What happens with the EOF or end of file condition?

In C++ EOF is a special function which will return nonzero when there is no more data to be read. In C++ nonzero means true, the alternative to nonzero is zero which means false.


What is the return value of getch function?

It returns an int, representing a character. (Basically, chars are ints.) However, if EOF (End-Of-File) has been read, it will return EOF (-1) and set the eof error flag accordingly.


How the end of file can be detected in c plus plus?

Use the istream::eof() method.


Why we don't use upper case in C programming?

Of course we do, 'FILE' and 'EOF' for example are all capitals.


Write a program that outputs the source code of a program?

#include <stdio.h> main() { FILE *fd; int c; fd= fopen("./file.c","r"); while ( (c=fgetc(fd)) != EOF) { printf("%c", c); } fclose(fd); }


How do you stop writing a file in c by using ctrl z in cpp?

Ctrl+Z mean EOF in WinDos, no matter what programming language you are using.


How do you write a c program that counts number of blanks in a text file using standard io?

int count_whitespace (FILE* input) { int c, count=0; while (( c = getc(input) ) != EOF ) if ((char) c==' ') ++count; return count; }


How do you read the number of capital letters in a input file using c language?

#include <stdio.h> #include <ctype.h> ... int caps = 0; int c; file = fopen ("InputFile", "r"); while ((c = fgetc (file)) != EOF) { if (isupper (c)) ++caps; } fclose(file); ...


Explain in details about get char?

#include <stdio.h> The function getchar() returns an int corresponding to the next character in standard input. The value EOF indicates error or end-of-file.


What are the different types of files and how End Of File of a full represented by a pointer?

There are two file types in C++ namely, text file and binary file. In text file EOF or end of file is represented by an end of file character having ASCII 26. In binary files EOF or end of file is represented by NULL in the file pointer