I want to ask whether compiler or language itself describes its file extension. e.g for c programming we use .c file extention who describes them ? This question arose when gcc compiler and Microsoft visual C 6.0 compiler behaved differently for the file extension. Take a look at this simple C Code:
Save this file as .c and compile with gcc compiler (gcc -Wall file.c) and you will get expected output but saving the same file with .cpp extension and compiling with gcc compiler gave errors.
Now coming to Micosoft visual c++ even if you compile the code with .cpp extension (Although it is pure C code) it doesnot mind?
plz someone reply