C Features
C has been used for decades, because of a few strong features. Here are the main ones.
Main features of C
| Feature | Meaning |
|---|---|
| Simple and small | Only 32 keywords in the standard C, so it is easy to learn the basics. |
| Fast | C code is compiled to machine code, so it runs very fast. |
| Portable | The same C program can be compiled on Windows, Linux or macOS with little or no change. |
| Structured | You divide a big program into small functions, which are easy to read and test. |
| Low level access | You can work with memory addresses using pointers. |
| Rich library | Standard library gives ready functions for input, output, strings, math and files. |
| Extensible | You can add your own functions and header files to the program. |
Compiled language
A C program is first compiled. The compiler checks the code and converts it into an executable file. Then you run that file. If there is an error in the code, compiler shows it before the program starts.
Pointers and memory control
C lets you take the address of a variable and work with it directly. It is powerful, but you must be careful. A wrong pointer can crash the program. We will learn it slowly in the Pointers chapter.
Limits of C
- No built-in classes and objects (C++ and Java have them).
- No automatic memory cleaning. You manage memory yourself.
- No built-in string type. Strings are arrays of characters.
Note:
These limits are also why C is so good for learning. You see what other languages hide from you.
Next: C Installation.
Congratulations! Chapter Finished. Learn more about the similar topics:
| Exercises & Assignments |
|---|
| No Content Found. |