# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Print Pascal's triangle

C Finds Sum of Even Numbers from 1 to N -
C Program to input upper limit to find sum of even number. Store it in some variable say N. Initialize another variable to store sum with 0 say sum = 0. To find sum of even numbers we

C Sender program using Message Queues -
This is the C sender program using Message Queues. A message queue program code that shows a client server implementation. Enter some message text you want to send.

C Demonstrate Printf inside another printf -
Firstly Inner printf is executed which results in printing 1324. Printf returns total number of digits i.e 4 and second inner printf will looks like. It prints 4 and returns the total number.

C++ Find Chromatic Index of Cyclic Graph -
Algorithm finds the "Chromatic Index" of the given cyclic graph. It takes the input of vertex pairs for the given number of edges. Assigns a 'color to edges' without assigning the same

Program Finds Sum of First and Last Digit -
C Language Program to input a number and find sum of first and last digit of the number using for loop. Input a number. Find last digit. Find total number of digits - 1. Find first digit.

If entered string contains Space Character -
C Programming code to find out if entered string contains a space character. Enter string. String will be terminated if you press Ctrl-Z. String contains a Space Character.

C Sum of Row & Column of a MxN Matrix -
C Program finds the sum of each row & each column of a MxN matrix. The c program code accepts an MxN matrix. Then adds each row of the matrix and also adds each column of...

C Construct a Balanced Binary Search Tree -
Code construct a balanced binary search tree which has same data members as the given doubly Linked list. This C Program creates a balanced binary search tree which has same