Introduction to Programming

C Programming Beginner’s Guide — Part I: Introduction to Computer Programming in C

Siraj Qazi
3 min readJul 23, 2020

In any human civilization, languages have been the primary medium of communication since times immemorial. In order to ensure that a meaningful conversation happens between two people, they must either speak in the same language (that both of them understand), or they must have knowledge of each other’s languages. In today’s digital era where everything is slowly being automated, it is essential to know the languages understood and spoken by computers.

So What is Programming anyway?

Programming is simply a way to tell a computer what you want it to do. That’s pretty much all there is to it. Once you learn how to talk to your computer, you can do a lot of cool stuff with them. But they don’t speak English, or Spanish, or German, French, or any human language, so they’re not gonna understand you unless you learn their language!

Quick! Open Notepad on your Microsoft Windows PC (Search > type notepad), copy and paste this little code into it:

security.bat Batch File

Click File > Save As and save the file with a .bat extension (e.g security.bat), don’t forget to change the Save as Type to All Files.

If now you double-click on your security.bat that you just created, you’ll see a window will open asking for your name. If you enter any other name than my name (Siraj), the screen is cleared, the text becomes red and tells you that access is denied. But if you do enter my name, you’re taken to a new screen that welcomes you!

You just made the computer do something new!

This was just a teaser, you can mess around with the code and change the allowed name to be your own, by putting your own name instead of mine at Line 4 of the code. You can also allow for more names by adding another line under Line 4 as:

if %name% == John goto success

Purpose here was to introduce you to the World of Programming, and this is nothing compared to how powerful things you can do once you master a certain technology. The above code you wrote was in Windows Batch language, which is a command-line scripting language developed by Microsoft for use in Windows. This post is the first in the series of articles on the C Programming Beginner’s Guide, in which I will teach you the ins and outs of the C Programming Language, which is not only a powerful language but also extremely popular, simple and flexible.

The C Programming Language

In 1972, the great computer scientist Dennis Ritchie invented the C Programming Language while working at the Bell Laboratories. C contains all the features of its preceding languages (ALGOL, BCPL and B) and many more additional concepts that make it unique from other languages. It would not be wrong to say that C is the base of all programming, and many later languages have borrowed directly or indirectly from C, including C++, C#, Unix’s C shell, D, Go, Java, JavaScript, Limbo, LPC, Objective-C, Perl, PHP, Python, Rust, Swift, Verilog and SystemVerilog.

Hello World!

In the upcoming posts I will be explaining all the things you should know to start programming in the C Language, but for now I want to end this post with the program every beginner programmer writes in any programming language new to him/her — a program that prints ‘Hello World!’ on the screen!

You’ll need something more than just notepad in order to run this, but that’ll be covered in the upcoming posts. The C Programming Beginner’s Guide Part II will continue from just where this post ends, so stay tuned!

Edit:

The C Programming Beginner’s Guide Part II is now available here.

--

--

Siraj Qazi

Undergraduate student researcher, freelance programmer and a tech enthusiast passionate about computers and modern technological trends.