Why C is the most powerful language
- Modularity and less keyword unlike other languages that have dedicated keyword for simple math functions, it has libraries more instead of keywords that makes it efficient.
- Complex Declarations , using complex declaration you can define any real world entity
- Storage classes such as extern & register, inline, volatile, const keyword which are low level in nature etc.
- Direct mapping of constructs to memory segments
- Pointers with Pointer typecasting & treating Function name as pointer , i think pointers are useless without pointer typecasting. Function name is treated as pointer in C which makes it very powerful and also pointer arithmetic.
- Wide varieties of types from long long to char , floating type such as float or double but has weak type checking.
- void */int * as a generic data storage
- Use of expression in every place whether it’s in for , while or if
for(expression ; expression; expression); - Bit fields, Structural Packing and Padding, Reordering of structures
- inline assembly using asm keyword or #asm, still nothing is faster than Assembly.
- Direct compilation to native machine code instead of interpretation.
- No runtime error/linker error concept only shows Warning or crashes , example of runtime error can be array out of bounds or NULL pointer access.
- No Garbage collector but manual memory management makes it very tough & fast language.
- Tons of other memory management concepts in C and tightly associated with UNIX OS.
Comments
Post a Comment