Open In App

What are the differences between C and Embedded C?

Improve
Improve
Like Article
Like
Save
Share
Report

C Language

C is a general-purpose programming language, which is widely used to design any type of desktop-based applications. It was developed by Dennis Ritchie as a system programming language to develop the operating system.

The main features of C language include low-level access to memory, a simple set of keywords, and a clean style, these features make C language suitable for system programming like OS or compiler development. In nature it uses a native platform development scheme, ie the development of the application by it is platform-dependent and can only be used on a single platform.

Embedded C

Embedded C is an extension of C language and it is used to develop micro-controller-based applications. The extensions in the Embedded C language from normal C Programming Language are the I/O Hardware Addressing, fixed-point arithmetic operations, accessing address spaces, etc.

Embedded C Program has five layers of Basic Structures. They are:

  • Comment: These are simple readable text, written in code to make it more understandable to the user. Usually comments are written in // or /* */.
  • Pre-processor directives: The Pre-Processor directives tell the compiler which files to look in to find the symbols that are not present in the program.
  • Global Declaration: The part of the code where global variables are defined.
  • Local Declaration: The part of the code where local variables are defined.
  • Main function: Every C program has a main function that drives the whole code. It basically has two parts the declaration part and the execution part. Where, the declaration part is where all the variables are declared, and the execution part defines the whole structure of execution in the program.

In nature it uses a cross-platform development scheme, i.e., the development of the application by it is platform-independent and can be used on multiple platforms.

Difference between Embedded C and C

The following table list the major differences between the C and Embedded C programming languages:

    Parameters    

C

Embedded C

General

  • C is a general-purpose programming language, which can be used to design any type of desktop-based application.
  • It is a type of high-level language.
  • Embedded C is simply an extension of C language and it is used to develop micro-controller-based applications.
  • It is nothing but an extension of C.

Dependency

  • C language is a hardware-independent language.
  • C compilers are OS-dependent.
  • Embedded C is a fully hardware-dependent language.
  • Embedded C is OS-independent.

Compiler

  • For C language, the standard compilers can be used to compile and execute the program.
  • Popular Compiler to execute a C language program are:
    • GCC (GNU Compiler collection)
    • Borland turbo C,
    • Intel C++
  • For Embedded C, specific compilers that are able to generate particular hardware/micro-controller-based output are used.
  • Popular Compiler to execute an Embedded C language program are:
    • Keil compiler
    • BiPOM ELECTRONIC
    • Green Hill Software

Usability and Applications

  • C language has a free format of program coding.
  • It is specifically used for desktop applications.
  • Optimization is normal.
  • It is very easy to read and modify the C language.
  • Bug fixing is very easy in a C language program.
  • It supports other various programming languages during application.
  • Input can be given to the program while it is running.
  • Applications of C Program:
    • Logical programs
    • System software programs
  • Formatting depends upon the type of microprocessor that is used.
  • It is used for limited resources like RAM and ROM.
  • High level of optimization.
  • It is not easy to read and modify the Embedded C language.
  • Bug fixing is complicated in an Embedded C language program.
  • It supports only the required processor of the application and not the programming languages.
  • Only the pre-defined input can be given to the running program.
  • Applications of Embedded C Program:
    • DVD
    • TV
    • Digital camera

Last Updated : 23 Jun, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads