Getting Started with “C Programming Language”
Programming is a fundamental set of skills that everyone must learn at one point or another. And, many of you might be confused about which language to choose due to the broad range of choices and where to start from. So, I am here to guide you through the very beginning of your journey of programming with C programming language.
Why to choose C?
Many might ask why to pick C as the first language to learn. Well, there are many reasons to justify my recommendation of C as a first language. However, it is not a compulsion that everyone must start with C. Some other alternatives as the first language could be Python, Dart, JavaScript, etc.
First of all, C is known as the mother of all languages and if one masters the C programming language, s/he can learn other languages relatively quickly. It is just a matter of syntax and a few new and extra things to learn in a new language, otherwise if one has good knowledge of a language, s/he could learn another new language pretty easily afterwards.
Also, I am from Nepal and as of today the major programming language taught in the institutes of Nepal from higher secondary level to even master’s level is still C. There are some courses and institutes that teach some other languages like C#, Java, C++, etc.
With that being said, let’s start with the fundamentals of C.
Fundamentals of C
C is a beginner-friendly language in my opinion. At first, it might not look so but gradually you will come to realize that it is pretty easy to learn.
Here’s a simple code to print “Hello World!” in C.
#include <stdio.h>
void main()
{
printf("Hello World!");
}
Let’s not get deep into what each of the syntaxes means here and focus only on the surface-level ideas right now.
Here, the first line is a directory file accessed with a pre-processor. For now, think of it as a syntax you must write to use certain features like printing out the output on the console. “stdio.h” means standard input-output header file which is accessed using the “#include” pre-processor.
Similarly, the “void main()” is a function that must be in a C program in order for it to run. A function is always enclosed with curly brackets and there is a parenthesis after the name of the function, in this case, “main()”.
Finally, the ‘printf(“Hello World”)’ is an in-built function to print the text written within the double-quote inside of the parenthesis. Also, note that every statement ends with a semi-colon in C, and the function definition and the pre-processor are not considered as statements so we don’t add a semi-colon at the end of those.
And there you have the very fundamentals of C programming language. We will continue exploring C in the upcoming blogs. Until then, Peace out my friends !!✌️
Ps:- Click here to read the next blog about “Variables, Data Types and Operators in C”.