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++ > Visual C++ 5.0 Standard C++ Library Code Examples

The count algorithm counts the number of elements in the range [first, last +1)





Finds First & Last Occurrence of Character - Take a string and a character as input. Store it in the array "str[]" & variable key respectively. Using for loop search for the variable key. If it is found then increment the variable count. If

Check a Given Number is Perfect Number - This C program code checks whether a given number is perfect number. Perfect number is a number which is equal to sum of its divisor. For eg,divisors of 6 are 1,2 and 3. The sum of

C++ Codes Prints One Dimensional Arrays - You have to ask to the user to enter array size array elements to store all the array elements in one dimensional and then print the array in "one dimension" using one for loop as shown

Create an Array of Chars in C++ Language - String is a "sequence of characters". char data type is used to represent one single character in C++. So if you want to use a String in your program then you can use an "array of chars".

Code Finds Second Smallest of n Elements - Linearly traverse the data array. Keep track of the "Smallest Number". Simultaneously keep updating the second smallest number also. A function to calculate second. If array element

C Program Code to Sort Array of Structure - Problem to display the highest literate rate and the highest income of a state using array of structures. Firstly accept total number of states so that we can accept all the details...

C Codes Pointer to Pointer Double Pointer - In C, A "Pointer" holds the Address of another variable of same type. When a Pointer Holds the address of another pointer then such type of pointer is known as "pointer-to-pointer" or

Checks Character is Uppercase Lowercase - C program code to input character from user and check whether character is Uppercase or Lowercase alphabet using If Else Statement. Input a character from user. Store it in some