# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Print Stars Pattern - upsidedown

C Convert the File Contents in Upper-Case -
C Program to read a text file and convert the file contents in capital (Upper-case) and write the contents in a output file. Program to copy contents of one file into another by changing

Convert a Given Number of Days in Terms -
C language program take the number of days as input. For the number of years, divide the input by 365 and obtain its quotient. For the number of weeks, divide the input by 365 and

C Prints Even or Odd Numbers in a Range -
First give a meaningful name to the recursive function to print even odd numbers. Let's say printEvenOdd(). This function can print both even as well as Odd Numbers in given range.

C++ Programming Bubble Sort Algorithm -
The Bubble Sort is a simple sorting algorithm that 'repeatedly' steps through the List to be sorted, compares each pair of adjacent items and swaps them if they're in the wrong order.

C++ Samples for Constructor Overloading -
"Constructor" is automatically called when an object create. It is "special member function" of the class. Variable declaration, constructor without argument, and which constructor has

Program Check If a Number is Palindrome -
If a number remains same, even if we reverse its digits then number is Palindrome number. So 10201 is a Palindrome Number because it remains same if we reverse its digits. C codes

C Number of Occurrences of an Element in -
Code count the Number of Occurrences of an element in the linked list using recursion. This C Program uses recursive function & finds the occurrence for an element in an unsorted list.

C++ Codings Quick Sort & Randomization -
Quick sort is based on an 'algorithmic' design pattern called 'divide-conquer'. Unlike Merge Sort it does not require 'extra memory space'. The average time complexity is "O(n*log(n))"