4 Steps From Beginner To Advanced Level Of Mastering C/C++

C and C++ Logo

If you are just a newbie programmer, before you can jump and build a real application using C, you don't know how to get started or you just know very little about the syntax, the flow, the technique on how to do real programming in C. You can just begin your programming journey by learning some simple C code or to create small for just fun projects.

Here is my experience doing some coding from scratch in C, level after level, from the easy to hard that I did.

1. Learning Pointer Manipulation In C

Pointer is not an array, but a pointer behaves similar to an array. The difference is that an Array has an index while a pointer has an address to manipulate the value or the data in that specific address. A simple comparison diagram of Array and Pointer with respect to index and address can be seen in this diagram.

You can learn more about pointers and with example codes from C programming pointers from programbiz.com here https://www.programiz.com/c-programming/c-pointers.

2. Learning Data Structure - Write a program to deal with linked list

First, what is a linked list, it is a list of nodes that each node contains data and a reference to the next node. In the double linked list, it has reference to the previous node, but learning to implement a singly linked list is probably enough.

I have written about the linked list in the previous article here.

Well you can just use an array for storing a sequence of data, but there’s not much you can explore about arrays, other than, how to access an array, add a new array etc. With a linked list, you can learn stuff about memory allocation, looping, etc.

Data structure is not just about linked lists, you can also learn other data structures like B-tree or Hash table. I will definitely write about that in this blog in the next article.

3. GUI Programming

Although doing Gui is not a c domain, there's a lot of higher level tools like javascript and html for doing Gui efficiently, but maybe for learning purposes maybe you want to do some experiments building ui on c, it’s not gonna be as efficient as using more specific tool i mention earlier.

One very useful tip If you want to learn GUI programming in C/C++ is that you should learn the most used GUI library, and also cross platform GUI library, because GUI library is platform specific, you don’t want to write UI for each different OS. Qt is one of those cross platform UI libraries that is also a widely known UI library.

The official website for downloading and reading the documentation of Qt can be visited from qt.io.

4. Game Programming - Writing Game of life in C

This game has been implemented in many different programming languages, as a kind of second level hello world for programmers. You can also find a lot of people who implemented this game in C. 

Here’s what I found on Github, a game of life implementation using C++, you can check out from here stephengineer/Conway-Game-of-Life-Simulation. This project uses the Multimedia library SFML.

The Game of Life is a zero-player game that doesn't need any player, the player only needs to determine the initial state and then it’s requiring no further input. The player just needs to sit and observe how it evolves until it gets stuck and re-initializes a different state. 

Coding in C feels so hard, actually it is not hard to learn. However, like anything else, if you are just starting it, you will get confused even just what you need to start with, you don’t know how to leap to the next step after that. But how difficult anything is, it’s just a matter of time if you actually do it. You will eventually get used to it and become very good at it after a while of trying.

Learning to code and be good at it  isn't impossible. If you want to be a good programmer, the only thing you can do is by doing them a lot. to learn more about coding style in C. If you don’t have any previous coding experience, C is good enough to be your first language.


Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans

Spring Kafka - How to use ReplyingKafkaTemplate send and reply synchronously