Category — Tutorials

Improving your Debugging Techniques

Every single developer has at one point or another ran into a bug in their code. You can plan out your program, meticulously write it out, read over it, and in the end when you run it, you’ll inevitably find something that is wrong with it. The problem may be as simple as a syntax error or challenging such as a random segfault or semantic error. Whatever the problem is you’re bound to run into them from time to time. If you read on I’ll tell you five tips to improve your debugging techniques.
Click for more →

A Beginner’s Guide to Functions

You have now learned how to write your first c program as well as the different loops in the c language so its now time to learn about functions. In general, functions are blocks of code that perform pre-defined commands to accomplish a certain task. You can either use the built-in functions included in the library or user defined functions (ones you create).
Click for more →

Arrays vs. Linked Lists

I honestly can’t recall the number of times I’ve been asked about the differences between arrays and linked lists. There has been countless times when people have come up to me and asked “When should I use arrays and when should I use linked lists?” Since I’m getting tired of answering this so many times I felt I should write down my answer here :P
Click for more →

Loops in C

If you want to repeat the same blocks of code over and over you have two choices. Copy and paste each block or you can use a loop. In C there are three different types of loops: for, while, and do…while. Each of them has their own specific uses and syntax, and below I’ll explain all three.
Click for more →

The Mysteries of Pointers

One of the hardest concepts in the C programming language for me is Pointers. To this day I still often have to look in my text books when I’m diving deep into pointer world. Hopefully this tutorial will help demystify pointers for you.

What are Pointers?

Pointers get their name for one reason: they “point” to locations in memory. Pointers are just variables that store memory addresses, usually the addresses of other variables. With this memory address you’ll then be able to go to that address and retrieve the data stored in it. If you happen to have a large of data that you want to pass into a function it’s a lot easier to pass its location to the function than to copy every element of the data.
Click for more →

History of the C Programming Language

The C programming language was first developed between 1969 and 1973 by a team from Bell Telephone Laboratories. Many of the principles and ideas used in this language were taken from the programming language named ‘B’ (created by Ken Thompson) as well as its ancestors BCPL and CPL (Combined Programming Language and Basic Combined Programming Language respectively). Dennis Ritchie was the main person responsible for converting the C language from B but there were many others that helped such as: Ken Thompson, Alan Snyder, Steven C. Johnson, and Michael Lesk.
Click for more →

Hello World in C++

Hello, and welcome to a C++ tutorial. I am also going to happily assume that this is your first c++ tutorial too. If not, I hope to improve your understanding of c++. I will attempt to do so as simple as humanly possible. Shall we get started then?

In order to make programs you will need something called a compiler. We will use g++. A compiler I have come to love. I use linux so it comes with my operating system. I am assuming you are using windows, so follow the rules from this website: G++.
Click for more →

Your First C Program

So, you want to be able to write C programs? Well, you have come to the right place. Over the next few weeks I’ll be writing a series of tutorials called “The Basics”. Each one of these tutorials will cover a different subject that will help you learn how to program in C. In this weeks tutorial I’ll teach you how to write your first C program.
Click for more →