Introduction To C Programming Language

    

Hey folks welcome to Embedded Man in this article we will introduce you the C programming language but first things first what is programming language.

What Is Programming Language

In General a programming language is the way a programmer use to interact with computer internals because computers understand only machine code language ( which is a set of zero's and one's ) programming languages is like intermediate language between us and computer hardaware

a Formal definition of a programming language would be a set of commands , instruction and other syntax used to create a software programs. 

Languages a programmers use to code are called High-level language this code is then translated using a programs called Compilers into a Low-level language which is recognized directly by the computer hardware.

Another definition of a programming language  is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific task .

the term programming language usually refers to  High-level Programming language such as BASIC , C , C++ , JAVA , FORTRAN , Ada and Pascal .

Each programming language has a unique set of keywords ( words that it understand ) and a special syntax for organizing program instruction.

Brief history About C language 

C is a general-purpose programming language developed by Dennis Ritchie at Bell Laboratories in 1972. Since then, it has become a major language not only at Bell Labs but also throughout the world.

it was designed to provide a low-level access to memory and computers hardware.

 

,mm,mm

 

So after we have a brief idea about what is programming language And C language why using C in embedded system while there is a tons of languages out there or could we use any of them !!!!

Why using C In Embedded System

1. C is one of the oldest programming languages till date. From that time Unix and   its variants became popular in every consumer products, C was the language which occupied the core part of the OS.

2. C is neither low-level nor high-level language. You can closely work with the registers of the CPU. You can embed assembly code in your C program. 

3. Almost all Operating Systems are written in C.

4. C is very fast. Most RTOS (Real Time Operating Systems - will be covered later -) that are prevalent are coded with C. Alongside your phone’s OS like IOS and Android, there is a second OS for the baseband processor (phone calls and network operation) which is a RTOS. There are several RTOSs like VxWorks, ThreadX, QNX.,etc.

5. Most servers and databases are optimized using C and C++. Although they aren’t much used in embedded systems. The possibilities are endless with C.

6. Most Silicon Vendors provide C Library Interface/ Interface as the compiler and the toolchain(GNU tools or Clang/LLVM) for the particular Computer architecture is already available. For Example, ARM Compiler is using Clang from v6 and prior to that it was using gcc.

 

In the next few Articles we are going to take a deep understanding of C language and how to program in C.

 

Reference & Further Reading: