Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes

C++ Programming Code Examples

C++ > Arrays and Matrices Code Examples

Program to Find kth Smallest Element by the Method of Partitioning the Array

Count total number of Vowels Consonants - C program to find total number of vowels and consonants in a string using 'Loop and If Else'. 'Input String', store it in some variable say str. Initialize 2 other variables to store vowel and

C Programming Code Use Goto Statement - The goto statement is rarely used because it makes program confusing, less readable and complex. Also, when this is used, the control of the program won't be easy to trace, hence

Program to Generate All Pairs of Subsets - The "time complexity" of this algorithm is O (n*2^n). This algorithm takes the input of 'n' data element and prints unique subset pairs whose union gives the set. It generates 0 to

Calculate Display the Grade of the Student - To calculate "grade of a student" on the basis of his total marks in C++ Programming, ask to the user to enter marks obtained in some subjects (5 subjects here). To calculate grade

Swapping Two Numbers Without Variable - Imagine we have two number 1 and 2 stored in x and j respectively now. If we add x and j (1 + 2) and store it to x then x will become 3 and j is still 2. We subtract j (2) from new value of

Binary Search Tree Code in C++ Language - Smaller elements go left. Larger elements go right. All insertions are as leaf nodes. Remove a leaf node and remove a node with a single child. Remove a node with 2 children, replace

Check If a Given Number is Prime Number - Program takes a number and checks whether a given number is Prime or not. Take number as Input & Check if the number is Divisible by any of the natural numbers starting from 2. If

Code find maximum using ladder if.else.if - Instead of using Nested If Else. Lets combine 2 or more conditions together using Logical Operators. A number j1 among 3 numbers j1, j2 and j3 is said maximum if j1 > j2 and j1 > j3.