# C++ Programming Code Examples

## C++ > Recursion Code Examples

### Direct recursion vs indirect recursion

C++ Program Codes Print Prime Numbers -
For example, to print prime number between '3 to 29', here 3 is the starting number and 29 is the ending number, enter the starting and ending number to find and print all the prime

C++ Coding Repeatedly Search Same Text -
C++ program performs Naive string matching without using any specific library functions. A text and a pattern is given as input. Pattern is 'searched' for in the text and all "instances" of

Implement Nearest Neighbour Algorithm -
This is a C++ Program to implement nearest neighbour algorithm to 'solve TSP'. This C++ program implements the travelling salesman problem which computes the minimum cost

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.

Code Sum of Prime numbers between 1- n -
C program to find sum of all prime numbers between 1 to n using for loop. Prime numbers are positive integers greater than 1 that has only two divisors 1 and the number itself. For

Take Decimal Number as input & converts -
C Program code takes the decimal number (entered by user) as input and converts it into an octal number using the function. In this c program, you should be familiar with the...

Calculate Sum of all Elements of an Array -
Program code calculate sum of all elements of an array using pointers as arguments. The program calls a function to add the addition and passes the array argument as a pointer.

C++ Increment and Decrement Operators -
In this C++ example, you'll 'learn to overload' Increment ++ and Decrement -- operators in C++. "increment & decrements" operator are overloaded in best possible way, increase the