【正文】
same, and C also shares the same block structure with braces ({}) to mark blocks of code, and semicolons to separate statements. The first impression of a piece of C code is that it looks quite like C++ or Java code. Behind that initial similarity, however, C is a lot easier to learn than C++, and of parable difficulty to Java. Its design is more in tune with modern developer tools than both of those other languages, and it has been designed to give us, simultaneously, the ease of use of Visual Basic, and the highperformance, lowlevel memory access of C++ if required. Some of the features of C are: ? Full support for classes and objectoriented programming, including both interface and implementation inheritance, virtual functions, and operator overloading. ? A consistent and welldefined set of basic types. ? Builtin support for automatic generation of XML documentation. ? Automatic cleanup of dynamically allocated memory. ? The facility to mark classes or methods with userdefined attributes. This can be useful for documentation and can have some effects on pilation (for example, marking methods to be piled only in debug builds). ? Full access to the .NET base class library, as well as easy access to the Windows API (if you really need it, which won’t be all that often). ? Pointers and direct memory access are available if required, but the language has been designed in such a way that you can work without them in almost all cases. ? Support for properties and events in the style of Visual Basic. ? Just by changing the piler options, you can pile either to an executable or to a library of .NET ponents that can be called up by other code in the same way as ActiveX controls (COM ponents). ? C can be used to write dyn