# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Print Floyd's Triangle.

C Analogue Clock create and Display Time -
Record the time program starts execution. Record the current time, using the alternate method of. Convert the time_t value into a type tm structure. Create and display a string

C Convert Octal to Hexadecimal Number -
C program to input octal number from user and convert to hexadecimal number system. Octal Number System is a base 8 number system. It uses 8 symbols to represent all its

Codes Binary Number to Decimal Number -
Takes the binary number (entered by user) as input and converts it into a decimal number using function. To understand this program, you should be familiar with the following C...

Strrchr searches the string in reverse order -
'StrrChr' is similar to the function 'StrChr', the only difference is that it searches the string in "Reverse Order", would have understood why we have extra r in 'strrchr', yes you guessed it

Code Finds the Median of 2 Sorted Arrays -
Algorithm finds the median of 2 sorted arrays using binary search approach. Takes the input of 'n' Data Elements of both the arrays. Using decrease, conquer method find the combined

Find ith Largest Number from a Given List -
It is an improvement in BST by adding 2 more key functions - 'rank()' and 'select()'. The time complexity of Order-Statistic tree generation is O(n+n*log(n)). Once the tree is constructed

Program Code find First Digit of a number -
Finding the first digit of any number is little expensive than last digit. To find first digit of a number we divide the given number by 10 until number is greater than 10. At the end...

C++ Codings Global Function Friend Class -
Similar to friend class, this 'C++ Function' can access the private and protected members of another class. A 'Global Function' can also be 'declared as friend' as shown in the C++ Code