Before we can begin to write serious programs in C,
Four important aspects of any language:
· are the way it stores data,
· the way it operates upon this data,
· how it accomplishes input and output,
· How it lets you control the sequence of execution of instructions in a program.
We would discuss the first three of these building blocks in this chapter.
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.
Possibly why C seems so popular is because it is reliable, simple and easy to use.
An opinion that is often heard today is – “C has been already superceded by languages like C++, C# and Java, so why bother to learn C today”.
There are several reasons for this:
- To learn C++ or Java, You have things like classes, objects, inheritance, polymorphism, templates, exception handling, references, etc. do deal with apart from knowing the actual language elements. Hence one should first learn C language before migrating to C++, C# or Java.
- C++, C# or Java make use of a principle called Object Oriented Programming (OOP) to organize the program.
- Though many C++ and Java based programming tools and frameworks you would be still required to use the core C language elements—“learn C before C++, C# or Java”.
- Major parts of operating systems like Windows, UNIX, Linux is still written in C. This is because even today when it comes to performance (speed of execution) nothing beats C.
- Mobile devices like cellular phones and palmtops are becoming increasingly popular. Also, common consumer devices like microwave oven, washing machines and digital cameras are getting smarter by the day. This smartness comes from a microprocessor, an operating system and a program embedded in this devices. These programs not only have to run fast but also have to work in limited amount of memory. No wonder that such programs are written in C. With these constraints on time and space, C is the language of choice while building such operating systems and programs.
- You must have seen several professional 3D computer games. To match the expectations of the player the game has to react fast to the user inputs. This is where C language scores over other languages. Many popular gaming frameworks have been built using C language.
- At times one is required to very closely interact with the hardware devices. Since C provides several language elements that make this interaction feasible without compromising the performance it is the preferred choice of the programmer.
I hope that these are very convincing reasons why one should adopt C as the first and the very important step in your quest for learning programming languages.
Conversion Conversion Emoticon Emoticon