Introduction to C Language

Unit 1

Chapter 1: Computer Basic*

*CS101 Computer Basic is a small separate course prerequisite for KCS101/KCS201 Programming for Problem Solving – Using C

Chapter 2: Terminology

Chapter 3: Idea of Algorithm

Chapter 4: Programming Basics

Unit 2

Chapter 5: Arithmetic Expressions and Precedence

Chapter 6: Conditional Branching

Unit 3

Chapter 7: Iteration and Loops

Chapter 8: Functions

Unit 4

Chapter 9: Arrays, Structure, Union, and Enumeration

Chapter 10: Basic Algorithms and their Complexity Coexistence

Unit 5

Chapter 11: Pointers

Chapter 12: File Handling

Chapter 13: Macros & Command-Line Arguments

Appendix

KCS151/KCS251 PPS Lab Exercise

PPS Previous Year Question Papers

C is a general-purpose, high-level, structured programming language. It was developed by Dennis MacAlistair Ritchie at AT & T Bell Laboratories located in the USA in 1972, and hence he is known as the founder of C. Often C is called a “Middle-Level Programming Language”. It doesn’t mean that C is less powerful but it reflects the capability of C to combine the elements of high-level language with low-level language. C can be used to write an Operating System as well as an Application Software.

History

C was built to overcome the problems of older programming languages. It inherits many important features from its predecessor languages such as B and BCPL (Basic Combined Programming Language). BCPL was a procedural and structured programming language developed by Martin Richards. BCPL influence the language B written by Ken Thompson in 1970 at AT & T Bell Laboratory. C is influenced by B and indirectly by BCPL. This was the reason why C has been given the name C.
C was first implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and Dennis Ritchie developed a new edition of C called K&R C. It was for public use with several new features such as standard Input-Output library, long int, and unsigned int data type, compound assignment operators, etc. K&R C caused a revolution in the computer world and become a widely used computer programming language. By the late 1980s, C became popular and used for various types of mainframe computers, micro computers, and mini computers. In the summer of 1983, ANSI (American National Standard Institute) formed a committee to provide a modern and more comprehensive standard of C language. The standardization process took six years and in 1989 a new standard of C was formed by the ANSI committee referred to as ANSI C, Standard C, or C89. In 1990 ANSI C was adopted by ISO (International Standard Organization) as ISO/IEC 9899:1990 referred to as C90. Although there are minor differences between ANSI C and ISO C, therefore C89 and C90 refer to the same programming language. In 1995, some details were corrected in C90 and add more extensive support for international character sets. It was referred to as C95, which was further updated in 1999 with several new features such as inline functions, long long int, complex data type, variable length array, single line comments beginning with //, etc. This new standard is known as C99.

Initially, C was designed to build utilities and applications for UNIX. Later C was used to re-implement the UNIX operating system. UNIX and all essential UNIX applications have been written in C.

Characteristics & Advantages of C

C become a popular programming language because of its following characteristics and advantages:
  1. C is a robust, general-purpose, imperative programming language that could be efficiently used for a variety of applications such as Operating System, Compilers, Assemblers, Device Drivers, Databases, Games, Enterprise Applications, etc.
  2. C is a structured programming language. It allows the programmer to break down a complex program into small and easy functions. These functions are reusable codes and make the program easy to understanding. Debugging, testing, and maintenance of these functions are also easy.
  3. C is one of the early programming languages, but it is still best to learn programming basics. Many later programming languages inherit its rich features. So it is easy to learn other languages after C.
  4. C is often called a middle-level programming language. With the strength of low-level assembly language such as low-level access to memory, fast execution, etc. it also has the rich features of a high-level language like easy to code, built-in functions, operators, rich libraries and dynamic memory allocation, etc.
  5. C is a highly portable programming language thus program written in C can run on a variety of computer platforms without or with little modifications.
  6. C is an extensible programming language, it has the ability to extend itself. We can add our own functions to C libraries.

Limitation and Disadvantages of C

C is a popular programming language since it comes into existence. After each modification, it became more efficient, easy, and powerful but still, it has some limitations which are the following:
  1. C is a Procedure Oriented Programming language so that we need to build algorithms as a set of function calls.
  2. C doesn’t have support for Object-Oriented Programming (OOP) features such as Class, Object, Encapsulation, Inheritance, Polymorphism, etc. C++ (successor of C) was developed for these reasons.
  3. C doesn’t have strict type checking for variables. A floating-point or character type variable can also acquire the value of an integer.
  4. C also doesn’t perform run-time type checking. Instead, C performs automatic type conversion at run time.
  5. C doesn’t support namespace like C++. It is not possible to declare two variables with the same name in the same scope without namespace.

Aditya Saini

Please Share:
Facebook
Twitter
WhatsApp
Telegram
LinkedIn
Pinterest
Reddit
Tumblr
Email
Print

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top