C Program to Sort Linked List without Allocating Extra Memory

We’ll first create a linked list which is not sorted, then we’ll re-arrange the list such that the list becomes sorted. Logic is simple, we’ll iterate the list for all nodes, in every iteration we’ll take the first node out of the original list and insert that node into a new list. At any point … Continue reading “C Program to Sort Linked List without Allocating Extra Memory”

C Program to Convert Binary Number to Decimal

Binary number system is 2-based which means at most two symbols, 0 (zero) and 1 (one), can be used to represent a binary number. Example of binary number is 110110011, sometimes binary numbers are written as 1101100112, where 2 is represented as base of the number system. Binary number system is the basis of all computer and digital systems. … Continue reading “C Program to Convert Binary Number to Decimal”

Compilation Error, Linking Error and Run Time Error

All these types of errors refer to different stages of program’s lifetime. To understand these errors, we have to understand the stages of a program’s lifetime. Generally the programs are written in high level programming languages like C or Fotran which is referred as source codes. Source codes are human readable text that are written in English … Continue reading “Compilation Error, Linking Error and Run Time Error”

Difference between Compiler and Interpreter

Compilers and interpreters often deal with how program codes are executed. Program codes are human readable texts written in high level programming languages, such as C or Fortran, to accomplish certain tasks. One thing you should know that program codes can not be executed on its own. Either, they needs to be converted into executable, the machine language … Continue reading “Difference between Compiler and Interpreter”

How to Implement Smart Pointer in C++?

What is Smart Pointer in C++? From the name we can imagine that there is something smart about these smart pointers over normal ones. When we talk about pointers we essentially talk about memory operation and management. In C/C++, programming memory management is always a programmer’s nightmare. Not because it’s very difficult but the programmers … Continue reading “How to Implement Smart Pointer in C++?”

0
3
0
2
2
0