O Notation : Time to get efficient!

This is a topic that is often a sticking point for developers, it shouldn’t be. Big O notation is somewhat of a standard for measuring the run time efficiency of an operation in your program. As software developers, it is often our job to make everyone’s lives more efficient. We may as well make our solutions as efficient as possible, you know, with the hacker ethic and all that.

Continue reading

Doubly linked lists in C : With open source ADT.

This article describes the the doubly linked list data structure. I have written an open source ADT, and uploaded it to my github account, as well as an example application of how you can go about using it in your applications. I use void pointers in this code, which means you can actually write your application to deal with all kinds of data, and my ADT will support adding it to a doubly liked list.

Continue reading

Linked Lists in C, With open source ADT.

Linked lists in C are fairly awkward to create and use in C in comparison to other programming languages. This article will take you through how they work, and how you would go about implementing them. When reading this, you should remember that I will be keeping the code minimal, however, I have made a completely working linked list ADT for you to use in your applications and uploaded it to my github account as open source.

Heres the link : https://github.com/LeamDelaney/Linked_List

Continue reading

String Concatenation with strcat

strcat is quite simple. The task of actually concatenating stings in software development is one that is seen almost every day. Yet, somehow, many developers will seem to run into problems with it on a regular basis. Messing up concatenation will lead to all manner of memory corruption. This article has been written to help you write string concatenation code correctly, using strcat().

Continue reading

Character Arrays. (Strings in C)

Strings in C are actually called Character arrays. In most other programming languages, you will constantly hear the word “String” being thrown around. This is all well in good, but when you think about it, these are actually a collection of characters which aren’t necessarily numbers, or letters. Therefore, in C, which is a more coherent programming language than most, Strings are called Character Arrays. This article covers them.

Continue reading

Memory and Pointers in C : Part 1

When it comes to programming in C. If you want to become great at it, you really need to understand how C utilizes memory. This is the first in a series of articles which will cover exactly how you would use memory and pointers in C. This is a topic that many programmers fear due to the bugs which arise from memory issues often caused by pointer arithmetic. In this series of articles I will be showing you how your program will interact with a computer’s memory. We will look at what happens when you read and write the value of variables, how arrays work and common memory mistakes.

Continue reading

The switch() statement

If you have read my article on if() statements, and progressed into using them in any program you might be putting together, you have probably realized that they are insanely useful for changing just how powerful your application can be. However, when you are checking one variable for a bunch of possible different values (of which each value will be associated with a different instruction for your program, you will quickly find out just how messy an if() statement can be. That’s where switch() comes in.

Continue reading