as far as i know (may be i'm wrong) file with a .c file extension can have only 'c' and not 'c++' code. But recntly i've downloaded some code files with the extension '.c' (they were written for design pattern handling). But they have classes in them (i.e only C++ code has classes not C code).
1. How come it is possible to have C++ code in file with the extension '.c'?
2. How does the compiler comprehend this?
i'm confused ... please help!