What is the meaning of 'C extension'?
An extension in C is a feature supported by a C compiler that is not described (permitted, mandated) by the C standard. (And similarly for C++, since the question is tagged like that.)
For example, GCC allows you to define a function within the body of another function; standard C does not. That is a C extension.
Do you mean the .c extension on source code files? That just means that the code within the file is (supposed to be) C. It's different from the .cpp extension in that a .cpp extension indicates C++ code in the file.
Hijacking GreenMatt's answer
Possible extensions for C++ source code
On MacOS X, man g++
lists 7 possible/acceptable extensions for C++ source code:
file.cc
file.cp
file.cxx
file.cpp
file.CPP
file.c++
file.C
It also mentions file.i
is a file that does not need pre-processing - it contains the output from the C preprocessor.
精彩评论