C++

Introduction to Stacks

Submitted by moazkhan on

Introduction to Stacks

In this tutorial, you will 1. Learn the concept of stacks. 2. Be given practical examples of LIFO 3. Learn what the types of implementation of stack are? 4. learn the array based implementation of stacks. What is the concept of stacks? The concept of stacks is very simple. It is that if you insert an element in a stack, it always occupies top position and when you remove element, the element at top is always removed. i.e. the element inserted last is removed first. Another name given to such insertion is LIFO i.e. last in first out.

Linked List using C++ part5

Submitted by moazkhan on

Linked List using C++ part5

In this tutorial, you will learn 1. Code of adding a node in middle of an ordered linked list. 2. Code for deleting a node in the middle of linked list. What is the code for adding a node in any location in ordered linked list? If you have read the previous tutorial, you already know that an ordered linked list is one in which data is arranged in ascending order. So when you add data in such a list, it must not distort the ascending order of list. Hence, you cannot add data anywhere in the list.

Linked List using C++ part 2

Submitted by moazkhan on

Data Structure using C++

In this tutorial, you will learn implementation of following functions 1. Constructor 2. Checkempty() 3. Traversal 4. Insertion at beginning Along with this tutorial, C++ code is given which has structure node and class Linklist containing these codes with a main to help you in understanding how these functions are being used. What is the code of constructor? The code of the constructor utilizes the fact that we want to make a check empty function which returns 1 if linked list has no element and 0 if it has elements.

Linked Lists using C++

Submitted by moazkhan on

Linked Lists using C++

In this tutorial, you will learn 1. Different operations of linked list. 2. Implementation of linked list. 3. Why some of the basic functions are available What are the different operations in linked list? Following are the operations linked list is supposed to perform. 1. Traversal: There must be a way to access the elements of a linked list. In linked list, we have data and a pointer pointing to next element.

Data Structures using C++

Submitted by moazkhan on

Data Structures using C++

Only basic concepts will be discussed in this tutorial. Implementation using codes will be discussed in next tutorial. In this tutorial, you will learn 1. Advantages of using arrays. 2. Draw backs of arrays. 3. The basic concepts of linked list. 4. Types of Linked List. 5. Linked list vs. Arrays. 6. Creating a linked list using Object Oriented Programming. What are some advantages of arrays? As most of you know the basics of C++ programming or programming in general so you all must have used arrays.

Introduction to Data Structures using C++

Submitted by moazkhan on

Introduction to Data Structures using C++

Objectives: In this tutorial, I will 1. Briefly explain the meaning of data structures. 2. Explain the importance of data structures. 3. List different data structures. 4. Tips on selecting the type of data structure to use for a particular application. What does the word Data Structures mean? A Data Structure is a way of organizing or grouping the data available to you so that it can be used later in a convenient way using the minimum resources of computer (e.g. memory ) and user (e.g. time ).

Exception Handling in C++

Submitted by moazkhan on

Exception Handling in C++

In this part you will learn: 1. What is an exception? 2. How using exception is useful? 3. How to use exception in a Program? 4. C++ syntax What is exception? In a class there arise many errors, depending upon the type of program handling these errors can be critically important sometimes. Exceptions is the way through which we handle the errors in a class using object oriented approach. Exceptions can occur due to many reasons like if the system has run out of memory or the object is initialized to impossible values.