Learn C Programming
Basics of C programming
C is a general purpose high-level language most popular amongst coders, it is the most compatible, easy to learn and effective programming language. It is a successor of B language that came out way back in the 70s and has been the most popular
programming language ever since. Features of C programming:-
● C is a Middle level language.
● It is case sensitive.
● It is easy to extend.
● Highly portable.
● It is fast and efficient.
● It is more widely used language in operating systems and embedded system.
● It is the simple language.
Why C is a middle level language?
To understand this let us first understand what higher and lower level languages are with example.
A higher level language would be the language that we humans speaks like simple English and lower level language is that a computer can understand like binary (1s and 0s) called machine language, while C is a middle level language that is between higher and lower level and is also called assembly language. It uses simple words from English
like for, if, while, include and also symbols like +, ++, <, %, & to carry out tasks and to interact with our computer.
We Used C Language in Following Areas:-
● We can create an Operating System with the help of the C language. Mostly all operating systems are developed in C language like Unix, Windows operating system.
● We can develop assemblers in C language.
● We can develop compilers in C language.
● Network Drivers are also created using C language.
● Text Editors are developed using the C language like Notepad++,gedit e.t.c.
● Database Management System are developed using the C language like oracle database.
Limitations of C language:-
● No exception handling is done.
● We can not reuse the code in C language.
● In C language, no run time type checking is done.
● C language doesn’t support Object Oriented programming.
Features of C
The reason for the popularity of the C language is its features, these good features make this language unique, mother language and Powerful language.
C is a procedural programming language. It was mainly developed as a System
programming language, for writes the operating system program. Its main features are:- presence of low level access to memory, use of simple set of keywords, this features make suitable of C language, it is portable.
There are some features of the C programming language:-
Features of C:-
● Small
● Speed
● Modularity
● Case sensitive language
● Middle level language
● Structured
● Memory Management
● Rich library
● Pointer & Recursion
● Extensible ● Fast
Small:-
● C provide 32 reserved keywords, these keywords provide control to programmer on language. By understanding the use of keywords we can do programming in C language.
● C language can easily learn in less time because, C language is small and simple language.
● This language provide structure approach.
● In C language there are various data types and library function provided to solve the problems.
Speed:-
● The main feature of the C language is Speed because after assembly language C language is considered to be the fastest.
● The compilation and execution time of the C language is very fast.
● C language is also known as Low level language.
● This language is very close to the hardware. Modularity:-
● C is a Modular programming language. In this feature small modules are made to solve any problem and these small module are known as function. By dividing any program in modules, it becomes easy to manage or debug the program. Case Sensitive:-
● C is a case sensitive language.
● In case sensitive programming all letters are different weather they are small and capital variables, which makes it easy for the programmer to create variables in a program.
Middle level language:-
● This is the main feature in features of C.C language is a middle level language because C language can make high level and low level software.
● C language is also used in programming of low level language, in which system applications are created.it also supports the features of high level language, that’s why C language is called a middle level language.
Structured:-
● C is a structure programming language.
● In this feature small modules are made to solve any problem and these small module are known as function. By dividing any program in modules, it becomes easy to manage or debug the program.
Memory Management:-
● Memory Management is a good feature in features of C.
● C language supports the feature of dynamic memory allocation.
● We can allocate time memory with the help of free() function. Rich Library:-
● This is the most important feature in features of C.
● C language provides various in-built functions, with the help of which we can speed up any program.
Pointer and Recursion:-
● C language provides Pointer and Recursion feature.we can directly handle the memory with the help of Pointer.we use pointer for Array,Function,Structures.
● In C programming, we can call function inside the function.C language provides code re-usability to us.By which we can use the code of any function again. Extensible:-
● In the C programming language, you can add your own user defined library and use it. Because the C language is an extensible programming language and we can add new features easily.
Fast:-
● After assembly language C language is considered to be the fastest.
● This is also sometimes called low level language.
● C language is close to the hardware.
Introduction of C
C is procedural and high level structured oriented programming language.c is used for general purpose programming.it was developed by Dennis Ritchie in between 1969 and 1973.It is simple and flexible.
C was invented to write everything from operating system like Oracle database,Git and more.
We can say that, C is a base for the programming .if you know about “C” language ,you can easily get the knowledge of other programming languages uses the concept of C.
Some facts about “C”
● C was developed by Dennis Ritchie in between 1969 and 1973.
● American National Standards Institute (ANSI) had organized the C language in 1988.
● C was invented to write from operating system.
● Linux,Oracle database,PHP are written in C. Application of C language
● It is used in writing embedded software.
● It is used for creating system application,
● Database system
● Operating system
● Compilers and assemblers
● Interpreters
● The core parts of UNIX,WINDOWS are written using the C language.
● It is used to create graphical application.
● It is used in network drivers.
Advantages
● It is case sensitive.
● It is highly portable language.
● Programs written in c language efficient and fast.
● It is easy to understand.
● C language is procedure oriented language. Disadvantages
● It does not have any concept of destructor and constructor.
● C++ is developed because C does not have concept of oops.
● Lack of exception handling.