C++ Programming Code Examples
C++ > For Loops and While Loops Code Examples
Code find sum of all elements of an array -
Write a C program to read elements in an array and find the sum of all elements of the array. C program to find sum of elements of the array. How to add elements of an array
C Performs Quick Sort on A Set of Entries -
Perform Quick Sort on a set of entries from a file using recursion. The following C program, using recursion, performs 'quick sort'. A quick sort is a sorting algorithm with complexity of
Code Generates All Possible Combinations -
Algorithm print all the 'possible combination' of each length from the given array. The time complexity of this algorithm is 'O(n*(2^n))'. A function to print all 'Combination of a Length'
Remove all Repeated Characters in Strings -
C program to remove all Repeated characters in a String using loops. Input string from user. Remove all duplicate characters from a given string. Remove all occurrences of a character
C Programming Code N-Queen's Problem -
Enter the number of queens(say n) and watch how computer places them in (n x n) matrix such that none can meet another moving along horizontally, vertically or digonally.
C Program code find LCM of two numbers -
C program code input two numbers and find LCM (Lowest Common Multiple) using loop. Input two numbers from user. Store them in some variable say j1 and j2. Find maximum...
A Single Line Comment in C++ Language -
Any words in a line after "//" are "ignored" by the compiler. if you want to write a comment about 'what is about code doing' you have to write it in the following way: The "//" symbols
C Convert Octal to Binary Number System -
C program to input Octal number from user and convert to Binary number system. How to convert from Octal Number System to Binary number system in C. Octal number...