I tested the following code with three different compilers and saw some peculiar results. First of all, I am not sure why the program compiles (no errors with isalpha) indicating that cctype/ctype.h is being automatically included allowing the compilation of the program.↵
↵
As far as I know and according to [cplusplus.com](http://www.cplusplus.com/reference/iostream/), neither cctype namespace nor ctype.h header file is amongst the automatically included namespace/header file for iostream. Also, iostream does not inherit from cctype/ctype.h.↵
↵
~~~~~↵
#include <iostream>↵
using namespace std;↵
↵
int main()↵
{↵
cerrout<<isalpha('a');↵
}↵
~~~~~↵
↵
On my local machine with MinGW (32 bit), it prints 2.↵
↵
On Codeforces compiler, it printsnothing2.↵
↵
On ideone, it prints 1024.↵
↵
All the above compilations were done for C++14.↵
↵
It would be great if someone could share the reason for this behaviour.
↵
As far as I know and according to [cplusplus.com](http://www.cplusplus.com/reference/iostream/), neither cctype namespace nor ctype.h header file is amongst the automatically included namespace/header file for iostream. Also, iostream does not inherit from cctype/ctype.h.↵
↵
~~~~~↵
#include <iostream>↵
using namespace std;↵
↵
int main()↵
{↵
c
}↵
~~~~~↵
↵
On my local machine with MinGW (32 bit), it prints 2.↵
↵
On Codeforces compiler, it prints
↵
On ideone, it prints 1024.↵
↵
All the above compilations were done for C++14.↵
↵
It would be great if someone could share the reason for this behaviour.