CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
What is C.docx
1. What is C?
C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972. It was
designed and written by a man named Dennis Ritchie. In the late seventies C began to replace the
more familiar languages of that time like PL/I, ALGOL, etc. No one pushed C. It wasn’t made the
‘official’ Bell Labs language. Thus, without any advertisement, C’s reputation spread and its pool of
users grew. Ritchie seems to have been rather surprised that so many programmers preferred C to
older languages like FORTRAN or PL/I, or the newer ones like Pascal and APL.
A successor of the B programming language, it was developed to overcome the challenges of BASIC,
B, and BPCL programming languages. It had both high-level functionality and detailed features
required to program an operating system. During the 1980s, C programming gained popularity for
creating mainframes, microcomputers, and minicomputers and has become one of the most widely
used programming languages. Despite the emergence of numerous new languages like Java, Python,
JavaScript, and PHP, the popularity of C is not hampered. In fact, these languages have borrowed
many of their control structures and other basic features from C.
It is a very popular language, despite being old. The main reason for its popularity is because it is
a fundamental language in the field of computer science.
C is strongly associated with UNIX, as it was developed to write the UNIX operating system.
What are the Most Important Features of C Language?
The core features of a programming language describe its ability and uniqueness and how
beneficial it can be in developing software. Listed below are some of the significant features
of C language:
C as a Mother Language: C language is considered as the mother language of all the
modern programming languages because most of the compilers, JVMs, Kernels, etc. are
written in C language, and most of the programming languages follow C syntax, for example,
C++, Java, C#, etc. It provides the core concepts like the array, strings, functions, file
handling, etc. that are being used in many languages like C++, Java, C#, etc.
Simple and Efficient: The basic syntax style of implementing C language is very simple and
easy to learn. This makes the language easily comprehensible and enables a programmer to
redesign or create a new application. C is usually used as an introductory language to
introduce programming to school students because of this feature.
Fast: It is a well-known fact that statically typed programming languages are faster than
dynamic ones. C is a statically typed programming language, which gives it an edge over
other dynamic languages. Also, unlike Java and Python, which are interpreter-based, C is a
compiler-based program. This makes the compilation and execution of codes faster.
Another factor that makes C fast is the availability of only the essential and required features.
Newer programming languages come with numerous features, which increase functionality
but reduce efficiency and speed. Since C offers limited but essential features, the headache of
processing these features reduces, resulting in increased speed.
2. Portability: Another feature of the C language is portability. To put it simply, C programs
are machine-independent which means that you can run the fraction of a code created in C on
various machines with none or some machine-specific changes. Hence, it provides the
functionality of using a single code on multiple systems depending on the requirement.
Extensibility: You can easily (and quickly) extend a C program. This means that if a code is
already written, you can add new features to it with a few alterations. Basically, it allows
adding new features, functionalities, and operations to an existing C program.
Function-Rich Libraries: C comes with an extensive set of libraries with several built-in
functions that make the life of a programmer easy. Even a beginner can easily code using
these built-in functions. You can also create your user-defined functions and add them to C
libraries. The availability of such a vast scope of functions and operations allows a
programmer to build a vast array of programs and applications.
Dynamic Memory Management: One of the most significant features of C language is its
support for dynamic memory management (DMA). It means that you can utilize and manage
the size of the data structure in C during runtime.
Modularity with Structured Language: C is a general-purpose structured language. This
feature of C language allows you to break a code into different parts using functions.
Structure means to break a program into parts or blocks so that it may be easy to understand.
Mid-Level Programming Language: C is considered as a middle-level language because it
supports the feature of both low-level and high-level languages. C language program is
converted into assembly code, it supports pointer arithmetic (low-level), but it is machine
independent (a feature of high-level).