Enumeration Types and enum in C++

Written by Ali. Posted in C++

enum in c++

Enumeration in C is a convenience feature added to make coding easy. By use of enumeration, or more appropriately enum, a lot of hassle is simplified and code can be made easier to understand. Enum is a user-defined type used to store set of named constants called as enumerators. enum is a reserved keyword in C . 

Typecasting Pointers in C++

Written by Ali. Posted in C++

typecasting with pointers

Typecasting as earlier discussed is a powerful tool and demands extreme care when being handled. Typecasting pointers in C has to be dealt with the same level of care. The language allows typecasting to be handled efficiently even by the pointers, allowing a very versatile usage of pointers and making the code user efficient. Meanwhile, the pointers as discussed earlier can be very tricky to handled at times and a single mistake can send the code crashing or possibly memory leak.

Linked Lists: An Introduction

Written by Ali. Posted in C++

Linked List

There are many ways provided by the C language to store information. The most basic of them are variables of multiple types i.e. int, float, char etc. But when we require storing the information of a lot of such variables, the language has provided us a facility of arrays. Arrays are the most basic means of storing very large amount of data, and the sildenafil vs viagra language allows us the facility to manipulate the data in those arrays in any way we like. But arrays are static and if we need to allocate data on the run time, we use dynamic arrays to store space and allocate memory on the system as per our use. Dynamic arrays are helpful in many scenarios in this language, but sometimes the management of these dynamic arrays can turn to be an issue. There is one more way that C language allows to store information through, the use of Linked Lists.

Some More about Recursion

Written by Raza. Posted in C++

recursion in programming

 

Deviating a little from our series of discussion on Sorting Algorithms, this time and maybe the next one too, we would be plunging into certain other core concepts considered vital and important to good programming. Last time, we carried out the Selection Sort using the recursive technique. As recursion is a tricky and fundamental topic and a very powerful tool as well, we would be having some more discussion on recursion now.

Pointer Hazards in C++

Written by Raza. Posted in C++

Pointer Hazards in C++

Working in C++ is considered relatively difficult because the programmer is faced with many additional headaches; biggest of them being the memory management and the consequent pointer hazards. The allocation and de-allocation of memory at the appropriate time is not an easy job. But this very feature makes C++ one of the fastest and efficient Programming Languages. Pointers are used to access the memory blocks in C++. I assume that you are already familiar with the pointers. So I shall explain some of the dangers you might be in while working with pointers. Then gradually we shall advance towards more advanced usage and hazards.