saad shan saad shan - 1 year ago 68
C Question

How does the C language support upper case letters without giving or providing information about upper case in program


It is in upper case but the program (compiles and) runs without any error in C language, but C is case sensitive — how this is possible?


Answer Source

This works if you are using Windows or another operating system that ignores case on its file system. It doesn't work on Linux and other Unix flavours, because they do care about case (by default).

When you add an include statement like #include <any_file.h>, then the C-compiler will ask the operating system to open file any_file.h.

If your operating system doesn't care about case, then it will open any file that matches the pattern. If it, for instance, finds a file named aNy_fILe.H, it will open the file and present it to the C compiler.

The C-compiler will interpret the content of the file - this is the case-sensitive bit of the C language.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download