# C++ Programming Code Examples

## C++ > Beginners Lab Assignments Code Examples

### goto statement in C++ programming

Write the Number as the Sum of Numbers -
Algorithm "Counts the partition" of the given number. There is no straight method to count a total number of the partition so we need to 'Generate and Count' them. Time complexity

Reads Strings from a File in Reverse Order -
Program code to find out how many strings there are. Read string length. Check buffer is large enough and increase if necessary. Now get the position for the beginning of each...

Copy one String into Other without library -
Scan a string from "left to right", character by character. In each iteration "copy a character" to a new String variable. As soon as source or original string ends, the process of the coping

Compute to difference between two dates -
C Programming code sample to compute difference between two dates. Enter first day, month, year. No. of days of first date from the Jan 1. Count for additional days due to...

Code find sum of main diagonal elements -
Read elements in a matrix and find the sum of main diagonal (major diagonal) elements of matrix. Find sum of all elements of main diagonal of a matrix. Input elements in the

C++ Programs to Implements D-ary-Heap -
Filling up 'heap' with the array. A Function to check if heap is empty. Function to get index parent of i. Function to get index of k th child of i. Function to find least element. Function

C Program Arrange Numbers in Ascending -
C Program to Arrange numbers in Ascending order. Code 'prompts user' for the n numbers, once the user is done entering those numbers and this c program sorts and displays them in

Finds Greater Number of Entered Number -
Program 'takes a number' as input and finds a Greater number of the entered number using same digits. Take a number as input. Reverse the number and store it in the array. Using for