C++

Overview

C++ / Overview

Overview

C Language - Overview

C is a general−purpose, high−level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972.

In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard.

The UNIX operating system, the C compiler, and essentially all UNIX application programs have been written in C. C has now become a widely used professional language for various reasons −

  • Easy to learn
  • Structured language
  • It produces efficient programs
  • It can handle low−level activities
  • It can be compiled on a variety of computer platforms

Facts about C

C was invented to write an operating system called UNIX.

C is a successor of B language which was introduced around the early 1970s.

The language was formalized in 1988 by the American National Standard Institute (ANSI).

The UNIX OS was totally written in C.

Today C is the most widely used and popular System Programming Language.

Most of the state-of-the-art software have been implemented using C.

Today's most popular Linux OS and RDBMS MySQL have been written in C.

Why Use C Language?

C was initially used for system development work, particularly the programs that make-up the operating system. C was adopted as a system development language because it produces code that runs nearly as fast as the code written in assembly language.

Some examples of the use of C might be −

  • Operating Systems
  • Language Compilers
  • Assemblers
  • Text Editors
  • Print Spoolers
  • Network Drivers
  • Modern Programs
  • Databases
  • Language Interpreters
  • Utilities

C covers all the basic concepts of programming. It's a base or mother programming language to learn object−oriented programming like C++, Java, .Net, etc. Many modern programming languages such as C++, Java, and Python have borrowed syntax and concepts from C.

It provides fine-grained control over hardware, making it highly efficient. As a result, C is commonly used to develop system−level programs, like designing Operating Systems, OS kernels, etc., and also used to develop applications like Text Editors, Compilers, Network Drivers, etc.

Advantages of C Language

Advantages of C Language

Efficiency and speed − C is known for being high−performing and efficient. It can let you work with memory at a low level, as well as allow direct access to hardware, making it ideal for applications requiring speed and economical resource use.

Portable − C programs can be compiled and executed on different platforms with minimal or no modifications. This portability is due to the fact that the language has been standardized and compilers are available for use on various operating systems globally.

Close to Hardware − C allows direct manipulation of hardware through the use of pointers and low−level operations. This makes it suitable for system programming and developing applications that require fine-grained control over hardware resources.

Standard Libraries − For common tasks such as input/output operations, string manipulation, and mathematical computations, C comes with a large standard library which helps developers write code more efficiently by leveraging pre−built functions.

Structured Programming − C helps to organize code into modular and easy−to−understand structures. With functions, loops, and conditionals, developers can produce clear code that is easy to maintain.

Procedural Language − C follows a procedural paradigm that is often simpler and more straightforward for some types of programming tasks.

Drawbacks of C Language

Manual Memory Management − C languages need manual memory management, where a developer has to take care of allocating and deallocating memory explicitly.

No Object−Oriented Feature − Nowadays, most of the programming languages support the OOPs features. But C language does not support it.

No Garbage Collection − C language does not support the concept of Garbage collection. A developer needs to allocate and deallocate memory manually and this can be error-prone and lead to memory leaks or inefficient memory usage.

No Exception Handling − C language does not provide any library for handling exceptions. A developer needs to write code to handle all types of expectations.

Technology
C++
want to connect with us ?
Contact Us