DEV Community

loading...
Cover image for Why should you learn C in 2021?

Why should you learn C in 2021?

miljkovicjovan profile image Jovan M. ・3 min read

For a language created in 1972, C is a middle-level programming language, but still remains very close to hardware, which makes it very useful for programming in conditions of limited resources or in situations where the speed of execution is critical.

Why start with C?

  • C is not specialized to any particular area of application and is quite general, which makes it suitable for learning the fundamentals of computer programming.
  • Helps to understand the fundamentals of Computer Theories. Most of the theories related to computers like Computer Networks, Compiler Designing, Computer Architecture, Operating Systems are based on C programming language and requires a good knowledge of C programming if you are working on them.
  • C is very fast in terms of execution time. Programs written and compiled in C executes much faster than compared to any other programming language.
  • C is extensively used in Embedded Programming. Embedded Programming is also referred to as micro-controller programming, where C program is used to control micro-controllers.
  • C can be useful both in Embedded Systems and Data Science
  • Most modern operating systems are written in C

Your first program in C

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!");
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Now let's explain the code

Alt Text
Alt Text
Alt Text
Alt Text

Now let's see what the program outputs on the console

Alt Text

After all this years still C!?

Many of the C projects that exist today were started decades ago. But C programming isn’t limited to projects that started decades ago, when there weren’t as many programming languages as today. Many C projects are still started today; these are the most famous ones:

  • Google Google uses C code mostly for their backend programming (same is done with YouTube)
  • Microsoft Windows Microsoft’s Windows kernel is developed mostly in C, with some parts in assembly language.
  • Linux Linux is also written mostly in C, with some parts in assembly.
  • Mac Mac computers are also powered by C, since the OS X kernel is written mostly in C. Every program and driver in a Mac, as in Windows and Linux computers, is running on a C-powered kernel.
  • Mobile iOS, Android and Windows Phone kernels are also written in C.
  • Tesla Tesla's computers are tested in python and then translated to C for faster execution time. (also SpaceX does the same)
  • HP
  • Dell
  • Ford

Final thoughts

Most of Computer Science or any software engineering course students are introduced to C briefly as a lesson in Principles of Computer Programming. I advice anyone that is getting into programming to do his/her own research and find out exactly what you want to learn and make your own choice. I would say that it will take you between 2-3 weeks to learn the basics of C and I will suggest you do.

Drop any suggestions for posts or projects this is my 4 day in a row posting and I want to keep it going as long as possible.

Thank you for reading,
Stay safe,
~Jovan

Discussion (0)

pic
Editor guide