C++ Programming Code Examples
C++ > Code Snippets Code Examples
Set operatrions: insert, size, begin, end
Sorting Elements in Lexicographical Order -
C Language program code 'Sort Elements' in lexicographical order (dictionary order). This program takes 10 words(10 strings) from the user and sorts them in lexicographical order.
C++ Program Calculate GCD of 2 Integers -
Examples on different ways to calculate GCD of two integers (for both Positive & Negative integers) using "Loops and Decision" making statements. The "Largest integer" which can
Code Perform Scalar matrix multiplication -
C program to read elements in a matrix and perform scalar multiplication of matrix. C program for scalar multiplication of matrix. How to perform scalar matrix multiplication
C Code Print Fibonacci Series by Recursion -
Program print 'Fibonacci Series' by recursion. "L. Fibonacci" discovered a simple numerical series called Fibonacci Series. Starting with 0 & 1, each new number in the series is simply...
C++ Language & Monoalphabetic Cypher -
A substitution cipher is a method of encoding by which units of 'plaintext are replaced' with ciphertext, according to a regular system; the "units" may be "single letters", pairs of letters
Check the Number can be Express as Sum -
Check if an integer can be 'expressed' as the "sum of two Prime Numbers" of all possible combinations with the use of functions. This program takes a positive integer and checks
Efficient Implementations of Disjoint Sets -
numElements is the initial number of disjoint sets. Union "Two Disjoint" sets. For simplicity, we assume "root1 and root2" are distinct and represent set names. "root1" is the root of set
Code Removes First Occurrence of a Word -
C program to 'input any string' from user and remove first occurrence of a given word from string. Logic to remove 'first occurrence' of a word. Input string from user, store it in some