1. a) Explain features of C language.
Ans. C is a high-level programming language that was originally developed in the 1970s for writing system software. It is known for its efficiency, flexibility, and low-level programming capabilities. It was primarily created as an operating system programming language. Low-level memory access, a small collection of keywords, and a clean style are the fundamental characteristics of the C language, which make it appropriate for system programming like operating system or compiler development.
Features of C Programming Language includes:
-
Procedural Programming: C is a procedural programming language which uses a step-by-step methodology to solve issues. It makes it simpler to design and manage complicated programmes by using functions to combine related operations and procedures together.
-
Middle-level programming: C enables programmers to write code that is very efficient and quick since it is so near to the machine level. It offers basic memory manipulation tools including pointers that provide users immediate access to memory addresses.
-
Faster performance: Although newer languages like java and python offer more functionality than the classic C programming language, their performance rate actually declines as a result of the additional processing required. The C programming language, which is a middle-level language, gives programmers access to direct hardware manipulation; higher-level languages do not.
-
Portable: C is very portable, allowing for the compilation and execution of code on a broad range of platforms, from tiny embedded systems to massive supercomputers.
-
Static typing: Data types are checked at build time rather than at run time since C is a statically typed language. This increases programme reliability and aids in the early detection of errors.
-
Structured Programming: C enables structured programming, which places an emphasis on the usage of control structures like loops and conditional statements to manage the flow of programmes. This enhances the readability and maintainability of the code.
-
Modular Programming: C provides modular programming, which enables the division of projects into more manageable, reusable components. This promotes code reuse and helps to enhance code organisation.