C++ Programming Tutorial

 
 
 

Data File Structure Programs

Array

Insert, edit, delete, append, display, Srch. Insert, delete, merge, delete multiple occurrences Arrays as a Stack in graphics

Stack

Stack operations using array Stack using static memory allocation Stack using dynamic memory allocation Double ended link list as a stack Lnked list as a Stack Infix expr. to Postfix expr. Postfix expr. into an Infix expr. Arrays as a Stack in graphics Stack as an Arithmetic expr. Evaluater Graphical Rep. of Stack Stack to traverse - inodr, postodr, preodr

Queue

Queue using static memory allocation Queue using dynamic memory allocation Circular queue Linked list as a Queue Double Ended linked list as a Queue Graphical Rep. of Queue Arrays as a Linear Queue Array as a Circular Queue Arrays as a Linear Queue ( in graphics ) Arrays as a Circular Queue ( in graphics )

Linked List

Singly link list Circular linked list Doubly link list Linked list as a Queue Linked list as a Stack Double Ended linked list as a Queue Double Ended linked list as a Stack Infix to Postfix - Linked List as Stack Circular doubly link list Single Ended Linked List - Sorting in both odr Hashing - double ended Linked List Sort of link list

Tree

Linked List as a Binary Srch. Tree Set Class using Binary Srch. Tree Maximum depth of Binary Srch. Tree Minimum Spaning Tree Prims algo - minimum spanning tree Traverse binary tree - inodr, preodr, post Find number in binary Srch. tree display levell

Sorting

Bubble Sort Selection Sort Insertion Sort Radix Sort Merge Sort Quick Sort Heap Sort Linear Sort Shell Sort Topological Sort

Searching

Linear Srch. or Sequential Srch. Binary Search Breadth First Search Traversal Depth First Search Traversal Shortest Path-Given Source-Destination-Dijkstras

Hashing

Simple implementation of Hashing Hashing using double-ended Linked List Hashing using Mid-Square Method Example of Hashing n term of the fibonacci series using recursion

Recursion

Factorial of the given number using recursion Mystery of Towers of Hanoi using recursion
 
 

Image

 #include<iostream.h>
 #include<conio.h>

 long fact(int);

 main()
    {
       clrscr();

       int number;
       long factorial;

       cout<<\"\\n Enter the number = \";
       cin>>number;

       factorial=fact(number);

       cout<<\"\\n n! = \"<<number<<\"!\"<<\"  =  \"<<factorial<<endl;

       getch();
       return 0;
    }



 //----------------------------  fact(int)  ------------------------------//


 long fact(int number)
    {
       long factorial=1;

       if(number==0 || number==1);

       else
      factorial=number*fact(number-1);

       return factorial;
    }

    Related Post:
  1. Program to illustrate array of objects in classes

  2. Program to read a Non-Linear equation in one variable, then evaluate it using False-Position Method and display its kD accurate root

  3. Program that calculates area of triangle and rectangle using inheritance

  4. Program to evaluate series

  5. Program to search an element in an array using Linear search or Sequential Search

  6. Program that reads marks obtained by a student in a test of 100 marks and print pass if marks are greater than or equal to 50

  7. Program to add two polynomial functions

  8. Program which read device data from a text file and show each extension\’s dues

  9. Program of constructor overloading

  10. Program of Minimum Spaning Tree ( MST )

  11. Program of class to basic conversion

  12. Program to estimate the Differential value of a given function using Runge-Kutta Methods

  13. Program to illustrate the implementation of 3D Rotation Transformation along z-axis

  14. Program to show the 3D Reflection Transformation along zx-plane

  15. Program to show the 3D Shearing Transformation along y-axis

  16. Program to estimate the value of Second Derivative of the function at the given points from the given data using Central Difference Formula of order 2

  17. Program that differentiate b/w the variables of the storage class Auto and Static along with global variables

  18. Program to show the Simple implementation of Hashing

  19. Program to show the projection of 3D objects using Orthographics Parallel Projection w.r.t. xy-plane and along vector v

  20. Program to compute and print out the decimal notation for the reciprocal of each input integer