Why learn C programming language in 2023: Getting started with C programming.

ashish katuwal 01
6 min readMar 25, 2023

--

Photo by Emile Perron on Unsplash

Hello and welcome to this series of blogs. My name is Ashish Katuwal, and in this series of blogs, I will be documenting my learning of the C programming language.

This is my fourth attempt to learn the C programming language (or any programming language). (I gave up three times already.) Learning C in 2023 is important because C programming can provide a solid foundation for understanding low-level programming concepts and system architecture. And it is the basis of all programming languages. More in the section below (3. Why learn the C programming language?)

So, I look forward to an interesting journey.

1. What is C Programming Language?

C is a general-purpose programming language that is extremely simple and flexible to use. C is one of the best system programming languages that is still used today if we are working on hardware platforms and operating systems. It was created in 1972 at Bell Labs by Dennis Richie, with the help of Ken Thompson, while working for the Unix operating system. It is called the C programming language because it succeeds the B programming language.

C is also called a "god" programming language because of its versatility. It is also called the mother of all languages because almost all computing infrastructure is written in C itself:

Windows is written in C.

Unix and Linux are written in C.

GNU programs are written in C.

BSD Network Layer is written in C.

Java is written in C.

C++ compiler itself is also written in C!

and many more……

2. Application of C programming Language

C is a system programming language because it can be used to do low-level programming (for example, driver and kernel). It is generally used to create hardware devices, operating systems, drivers, kernels, etc. For example, the Linux kernel is written in C. It can’t be used for internet programming like Java,.NET, PHP, etc. (Thompson, 2022). C is used in the following areas:

  1. C’ language is widely used in embedded systems.
  2. It is used for developing system applications.
  3. It is widely used for developing desktop applications.
  4. Most of the applications by Adobe are developed using the ‘C’ programming language.
  5. It is used for developing browsers and their extensions. Google’s Chromium is built using the ‘C’ programming language.
  6. It is used to develop databases. MySQL is the most popular database software which is built using ‘C’.
  7. It is used in developing an operating system. Operating systems such as Apple’s OS X, Microsoft’s Windows, and Symbian are developed using the ‘C’ language. It is used for developing desktop as well as mobile phone operating systems.
  8. It is used for compiler production.
  9. It is widely used in IoT applications.

3. Why learn C programming Language?

Photo: Feature of C programming by Crack your interview
  1. Extremely fast because it was made to create Operating System and if OS is slow everything will go slow.
  2. Lightweight: C only has 32 keywords. It was created at a time when memory and storage were not available like right now. So, in order to create and run programs, the language had to be lightweight.
  3. It is simple as it has a structural approach and breaks down a problem.
  4. It supports dynamic memory allocation.
  5. C is a mid-level programming language that is intended to work like both low-level and supports the feature of a high-level programming language.

Besides that, students are encouraged to learn C because it helps you understand the internal architecture of a computer and how it stores and retrieves information. After learning C, it will be much easier to learn other programming languages like Java, Python, etc.

  1. How does C Programming Language Works?
Source code — compiler — machine code (object code)

The C programming language is a compiled language. The process of converting source code to machine code is called compilation. In simple words, a compiler is a program that converts high-level language to machine code. In order to run C, we have to set up a compiler for the C programming language called Compiler.

For the C programming language, we use a compiler called GCC. The full form of GCC is GNU C Compiler. And the full form of GNU is GNU not Unix. Well, the story of the GNU and GCC compilers is for some other days. But one thing we can be sure of is that the compiler we are using — GCC is the industry-level compiler.

GCC doesn’t have a graphical user interface, or GUI. It only has command-line language (CLI), so we use commands to create outputs.

For example, the command in order to compile a file is this

GCC <source code> -o <object code>

GCC hello.c -o hello

For Windows, we also have to install Mingw. And I almost forgot about IDE (Integrated Development Environment). Developers can start making new apps quickly with an IDE because they don't have to set up and integrate multiple utilities by hand as part of the setup process. We are using Visual Studio Code as our IDE.

Steps to get started with the C programming language.

1. Installation:

  • VS Code
  • Download Vs Code and install it.

2.Download MinGW-w64 — for 32- and 64-bit Windows

  • open mingw installation manager and install it.
  • Go to C folder and copy the path of mingw folder.
  • go to advanced system properties and environmental variables.
  • create a new path.

3. C extension for VSCode

  • Install C extension made by Microsoft.

Writing your first C programing code “Hello world.”

Here are the steps to write and run the “Hello, World!” program in Visual Studio Code:

  1. Open Visual Studio Code and create a new file by selecting “File” > “New File” from the menu bar or by using the shortcut key “Ctrl + N” (Windows) or “Command + N” (Mac).
  2. Type the following code in the new file:

#include <stdio.h>

Int main (void){

Printf (“Hello, world”);

Return 0;

}

  1. Save the file with a name like “hello.c” by selecting “File” > “Save As” from the menu bar or by using the shortcut key “Ctrl + Shift + S” (Windows) or “Command + Shift + S” (Mac).
  2. Open the integrated terminal in Visual Studio Code by selecting “View” > “Integrated Terminal” from the menu bar or by using the shortcut key “Ctrl + `”.
  3. Compile the program by typing the following command in the terminal and pressing “Enter”:

use compiler.

$ gcc helloworld.c -o helloworld

./helloworld

4. You should see the output “Hello, world!” in the terminal.

Congratulations, You have successfully written and run your first C program in Visual Studio Code!

ALSO READ THIS BOOK.

The C Programming Language is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as co-designed the Unix operating system with which development of the language was closely intertwined.

References:

Barbara Thompson. (2021, August 27). What is C programming language? Basics, introduction, history. Guru99. https://www.guru99.com/c-programming-language.html

Benefits of C over other languages. (n.d.). Online Tutorials

Library. https://www.tutorialspoint.com/benefits-of-c-over-other-languages

Cache://[www.guru99.com/C-programming-language.html](www.guru99.Com/C programming-language.html) — Google search. (n.d.). https://www.guru99.com/c programming-language.html

Features of C. (n.d.). crack your interview :

Database,java,SQL,hr,Technical. https://www.crackyourinterview.com/Tutorial-Features of-C.aspx

Veeraraghavan, S. (2015, May 18). Best programming languages to learn in 2021. Simplilearn.com. https://www.simplilearn.com/best-programming-languages-start learning-today-article

--

--

ashish katuwal 01
ashish katuwal 01

Written by ashish katuwal 01

interested in philosophy, design, video editing, computer science, and gaining new experiences.

No responses yet