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++ > Strings Code Examples

You can concatenate two string objects in C++ using + operator.





Access Elements of an Array Using Pointer - Program Declares the array of five element & the elements of that array are accessed using pointer. The five elements are entered by the user and stored in the integer array data. And

Finds the Sum of ASCII Values of All Chars - Program takes a 'string as input' and finds the sum of 'ASCII values' of all characters in given string. Take a string as "input & store" it in the array string[]. Initialize the variable sum to '0'.

Insertion Sort Algorithm in C++ Language - Insertion sort is simple sorting algorithm that builds the final sorted array ('or list') one item at a time. It is much less efficient on large lists than more advanced algorithms such as quick

Frequency of Characters in a C-style String - In this example, 'frequency of characters' in a String object is computed. To do this, "size()" function is used to find the Length of a string object. Then, the for loop is iterated until the

C++ Sorts Elements Lexicographical Order - This program sorts the 10 strings (entered by the user) in Lexicographical order (dictionary order). This program takes 10 words from the user and sort them in 'Lexicographical Order'

Program Prints Prime Numbers Between 2 - Example to print all 'prime numbers' between two numbers in C++ Language. This problem is solved using nested for loop and if...else. In this program, the while loop is iterated times.

Program to Create a Random Graph Using - This algorithm randomly assigns a number of vertexes and edges of the graph. It connects vertexes randomly & generates cyclic, acyclic or disconnected undirected graphs. Generate

Code Checks Even or Odd using Functions - Program input a number from user and check whether given number is Even or Odd using functions. Declare function to find even odd. First give a meaningful name to our function,