What is C language and features of C language

Unique features of C

C is an attitude.
For C is not merely a programming tool, a super-sufficient road roller that smoothens all the bumps that ever arose. Rather, it is a philosophy and a way of life. Like a benevolent parent, it allows a long rope within a loosely woven web of rules and principles, encouraging bouts of exploration on one’s own.

C was developed by Dennis Ritchie at AT &T laboratories. By nearly 1973, the essentials modern C was complete. And after this there was no looking back, as more a more computer professional switched over to C. Today there are C compilers available under very conceivable environment from DOS to WINDOWS to UNIX, an on all sizes of computers from micros to mainframes.

The four most important reasons for C popularity are power, portability, performance, flexibility.
C is the most powerful programming tool today because of its unique features:

  • C programming language is the middle level or intermediate level language this means it is machine oriented as well as user oriented language.
  • C has been widely used for writing operating system for example UNIX, Windows XP, DOS.
  • C is the only language whose compiler is also written in C language itself.
  • C has facilities for structured programming and it allows lexical variable scope and recursion.
  • Static type system feature of C prevents many unintended operations.
  • C has a rich set of 45 operators and 43 keywords.
  • C has its pointer which is very unique from any other language that provides the following benefits-
  • Pointer increases the execution speed and reduces the program execution time.
  • Pointer provides a sufficient tool for manipulating the dynamic data structures such as structure, link-list, queue and trees.
  • Function pointer, which allows for a rudimentary form of closure and polymorphism.
  • Pointers permit references to function and there by facilitating passing of function as argument to another function.
  • It provides low level unchecked access computer memory.
  • If a program requires accepting command line argument, then main function must have the argv, argc, env arguments declared in it. But C is so flexible that we cando it without using those.
  • C has union which combines the best features of all data storage objects combined with unmatched flexibility and ease of use. It is the ultimate data storage object that is available in C.
  • For efficient memory management C has bit fields in its structure.
  • The C preprocessor directive set the environment setting or recompilation instructions or conditions.
  • To store the array elements in memory C uses the row-major order.
  • 16 bit compiler compile the program into 16 bit machine code that will run on a computer with a 16 bit processor.16 bit machine code run on a 32 bit processor but 32 bit machine code will not run on 16 bit processor.
  • C’s power and fast program execution come from it’s ability to access low level commands, similar to assembly language, but with high level syntax.
  • The core C language leaves out many features included in the core of other languages. These functions are instead stored in the C Standard Library where they can be called on when needed.
  • The most strong point of C is its use of modularity. Sections of code can be stored in libraries for re-use in future programs. This concept of modularity also helps with C’s portability and execution speed.
  • Standard I/O library.
  • A relatively small set of reserved keywords.
  • Compound assignment operators of the form =op were changed to the form op= to remove the semantic ambiguity created by such constructs as, i =- 50, which had been interpreted as i =- 50, instead of possibly intended i = -50.
  • Most of the computer games are written in C language.
  • Treats upper case and lower case letters distinctively.
  • Commands may be inserted any where in the program.
  • Lean object code specific to target hardware.
  • Inherent or invisible functionality like memory management, stack frames, CPU –register manipulation, inline assembly etc.
  • Internationally standardized.
This entry was posted in C Programming, Interview Q&A and tagged . Bookmark the permalink.