C Programming Language

The Basics of C Programming Language

Tharuksi Gunasekara
2 min readApr 9, 2022

Hello friends, in this article, I am going to discuss about Basics of C Programming Language. There are five important things you should know before you start studying C programming language.

Operators

A symbol that directs the compiler to execute certain mathematical or logical tasks is known as an operator.

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Bitwise Operators
  • Assignment Operators
  • Misc Operators

The most basic example of an operator in C programming is the “+”. For example, you can use the “+” operator as follows:

Total = x + y;

Data types

Datatypes define the types of data being used. In the C programming language, data types are divided into five categories:

  • Basic

Example: character, integer, floating-point, double.

  • Derived

Example: Array, structure, union, etc.

  • Enumeration

Example: enums

  • Bool type

Example: true or false

  • void

Example: Empty value

C does not detect errors for you

Other fact about C programming which every learner should know is that it would not complain at all. Even if you make mistakes, C would not complain and continue its work. So, you have more chances of ending up with a lot of bugs.

You can try manual debugging for a few lines of code, but not for intricate and extremely long code. Other programming languages can prompt us if the code has any mistakes. That functionality, however, is not available in C. This is why it is essential to pay close attention to the development of each line of code.

Standard libraries

C has standard libraries that can be used for developing programs. The standard libraries have definitions of different macros, variable types, mathematical operations, and location-specific data. The most basic example of the standard library in C language is the “stdio.h”, which is the standard input/output header file. It helps in outputting to the console.

Debugging

Debugging is the most important fact about C programming. As evident from one of the points mentioned above, C would not give any warnings about errors. You must find them out on your own. As a result, you might utilize debuggers like GDB to track out any issues. Debuggers go through the code line by line, looking for errors in the code. As a result, among the other fundamentals associated with the C programming language, learning to debug is important.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Tharuksi Gunasekara
Tharuksi Gunasekara

Written by Tharuksi Gunasekara

I am an undergraduate of faculty of Information technology in university of Moratuwa

No responses yet

Write a response