# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### C++ Programming Code to Print Pascal Triangle

C++ Permute All Letters of an Input String -
This algorithm takes the input of a string with all distinct characters 'N' Value. It places each character to every index by Swapping Values. A function to 'swap character' values of string

Learn Bitwise Operators in C++ Language -
in C++, "bitwise operators" are similar to the Logic operators, but they perform the same logical operations on bits. All data in memory is represented in the "binary form". Variables

Code Extract Last Two Gigits of the year -
This c language program takes any year as input and prints its last two digits. Take any year as input. Divide the input by 100 and obtain its remainder. The remainder got is

Park-Miller Random Numbers Generation -
C++ Program to generate 'random' numbers using Park-Miller algorithm. general formula of a random number generator (RNG) of this type is: 'X_{k+1} = g X(k) mod n'. To generate

C Segregate 0s on left side 1s on right side -
C Program to Segregate 0s on left side and 1s on right side of the Array (Traverse Array only once). Function to segregate all 0s on left and all 1s on right. Increment left index while we

Find Factorial of a Number with Recursion -
C program to find factorial of a number using recursion. The factorial of a 'positive number' n is given by: factorial of n (n!) = 1*2*3*4....n The factorial of a 'negative number' does not

C Search for an Element in the Linked List -
Search an element in the linked list without using Recursion. C Program, using iteration, Searches for an Element in a Linked List. A Linked List is ordered set of Data Elements,

C Build Binary Tree if Inorder or Postorder -
C Program to Build Binary Tree if inorder or postorder traversal as input. Create a new node. Create a balanced binary search tree. Insert a node in the tree. Create a node and