in

Introduction to C Programming

C Programming

What is C?

C is a programming language that lets us give a computer very specific commands.

C was invented in 1972. It’s one of the oldest languages to be used even today!. It is one of the most widely used programming languages in the world. It has influenced many popular languages, mainly C++.

But why do we still use such an old programming language?
Why not something newer and easier to understand, like Python? Let’s see why.

Benefits

  1. C is often considered to be the mother of all languages because so many other languages have been based on it
  2. It also supports functions of high-level programming languages, such as scripting for software applications, etc
  3. Learning C can actually make you better at programming in other languages like C++, Java, or C# by equipping you with a mental model of what the computer is actually doing when you run your programs.
  4. C is highly portable and is used for scripting system applications which form a major part of Windows, UNIX, and Linux operating systems.

Features of C

Simple: C is a Structure-based language. i.e we can divide an extensive program into multiple parts, which makes it easy to write and understand.

C Programming Language is Efficient and Fast.

  • Programs written in C are efficient and fast.
  • This is the most critical factor for using C over other languages.
  • C is considered to be “close to the computer,” meaning we can program the computer to do precisely what we want.
  • To understand what this means, here is an analogy: Imagine you want your brother to buy you a cake from the store. In Python, you would just use one line to say “Buy me a cake from the store.” Your brother will go and come back in 5 hours because he went to a store very far to get the best cake available.
  • In C, we can tell your brother, “Get in the car, drive to the store around the block, buy the first Pastry you see, and drive immediately back”, which will happen in 20 odd minutes.
  • Of course, it won’t be the best Pastry. But it is much faster and is the exact cake that you wanted.

Portable: Programs written in C can be run on different types of machines with little or no modifications.

Where is C used?

C is widely used:-

  • For creating desktop applications
  • For developing games
  • For designing Operating Systems
  • For designing Compilers

Working of C Step by Step Procedure

Writing Source Code:
The first step is to write a source code for the desired project. The code is written using a text editing tool.

Compiling the source code :
The Source code is then converted into equivalent machine instructions so that the computer can understand it.

Checking for Errors :
The code is checked for all possible errors.

Linking :
The code is linked with other files of code. Sometimes it is difficult to put all your code in one file, so the computer needs to link them together if you decided to separate them.

Checking for Errors :
The code is checked for all possible errors once again.

Execution :
The code is then finally executed to get the desired output.

What do you think?

Written by mrwixxsid

Leave a Reply

GIPHY App Key not set. Please check settings

Writing Your First Program in C