3 years, 10 months ago.

Why C language is mostly in embedded system ?

C language ?

2 Answers

3 years, 10 months ago.

I am guessing this is a language issue, are you asking why is c the most commonly used language for embedded systems?

The question you actually asked is why is c not used outside of embedded systems.

Why is it used for embedded systems? Because it's fast and has a low CPU and memory overhead. More modern languages like c# or java are easier to use but are slower and require a lot more memory, not an issue on a desktop system with GB of memory but when you only have a few k to work with it's a big issue.

3 years, 10 months ago.

C isn’t used just for embedded programming; it’s also used extensively in the core of Linux, among other major projects. Some of that is probably inertia: you program in what you know. It’s also relatively easy to find other folks who know the language, when you need to bring in additional help. Also, having been around for decades, it’s not likely to fade into obscurity, stranding a number of projects.

To add to Andy’s comment, there is also a feature called “determinism,” which helps us developers figure out which instruction is executing on a particular clock cycle, which is needed for some critical applications. Interpreted languages, or languages that make run-time code path choices, may not offer the same level of determinism.