 C++ Programming Code Examples

C++ > Beginners Lab Assignments Code Examples

Find HCF LCM of Two Numbers

C++ Shutdown & Restart Your Computer - C++ sample made for both i.e., to shutdown your computer or to 'restart your computer', first it will ask to the user want to shutdown computer or want to restart computer. Then

Diameter Circumference & Area of Circle - C program code input radius of a circle from user and find diameter, circumference and area of the circle. How to calculate diameter, circumference and area of a circle whose...

C Coding to find Sum of Two Matrices 3x3 - C program to read elements in two matrices and add elements of both matrices. C code for addition of two matrix. Matrix addition program in C. Logic to add two matrix in C.

Converts Decimal Number to Octal in C++ - In the program, the decimal number is stored in the variable decimalNumber and passed to function decimalToOctal(). Function converts the 'decimal number' passed to its equivalent

Bubble Sorting on int array in C Language - C program bubble sorting code on int array. Reading in numbers. Sorting them using a bubble sort. Comparing adjacent elements. Exchange elements. Display sorted list.

Topological Sortings of a Directed Acyclic - Topological sorting for directed acyclic graph (dag) is a linear ordering of vertices such that for every directed edge 'uv', vertex 'u' comes before v in the ordering. 'Topological Sorting'

C Perform Matrix Multiplication Recursion - C program, 'using recursion', performs Matrix multiplication of 2 'matrices' and displays the result. We use 2 D array to represent a matrix & resulting matrix is stored in different matrix

C++ Language Implementation For Queue - Return the least recently inserted item in the queue or throw "Underflow" if empty. Return and remove the least "recently inserted" item from the queue. "Throw Underflow" if empty.