The C++ Zone: Live C++ Examples, Exercises & Projects
- Using a while loop to sum integers
- Using a do-while loop to control input
- Using a for loop
- Floating point control in a for loop
- Displaying numbers in scientific notation
- Multiple initializations in a loop expression
- Demonstrating the comma operator
- Generating multiplication tables
- Using the continue statement
- Controlling input with an infinite loop
- Calculating an average in an indefinite loop
- Using a while loop to sum integers
- Using an array
- Initializing an array
- Obtaining the number of array elements
- Analyzing the letters in a string
- Storing strings in an array
- Concatenating strings
- Accessing characters in a string
- Comparing strings
- Searching a string
- Searching a string for characters from a set
- Replacing words in a string
- Using an array
- Comparing array & vector
- Manipulation Of Vector Container
- Average using template iterators
- Average with template arrays file
- Average of string stream values
- Using simple integer iterator class file
- Averaging values from Integer file
- Using inserter
- Using STL list Container
- Word Collocation file
- Inverted word collocation
- Comparing array & vector
-
Implementing Int, Double, Float343votesBy silvercodes -
Initializing String type variables324votes -
Variable Example 3311votesBy justakash_s -
Initializing variables with Operators277votesBy silvercodes -
Data Types252votesBy kitoskorpy -
Declaration of variables139votesBy ramrayster -
Initialization of variables137votesBy ramrayster -
Variables. Data Types.114votesBy ramrayster -
Defined constants (#define)102votesBy ramrayster -
what is a variable?77votesBy pk_1992 -
Initialization of variables76votes -
Declaration of Variables63votes -
Global & Local variables57votesBy sanya -
global variable54votesBy MrProgramr -
Local Variable44votesBy ssshuhail -
Passing Variables to Functions44votesBy kitoskorpy -
Static and Dynamic Initialization of Variables2votes -
Constant Value2votes -
constant variable1votesBy tinkerton74 -
enum variable1votesBy gnomie -
Printing Variable String1votesBy silvercodes -
Char Arrays1votesBy silvercodes -
Dynamic initialization of variables1votesBy pk_1992 -
Reference Variables1votesBy pk_1992 -
Boolean type variable1votesBy sakimahesh -
Auto or default variable storage1votesBy sakimahesh -
Global and Local Variables1votes -
Global Variables1votesBy ssshuhail -
String type Variable1votesBy ssshuhail -
Difference between Global and Local Variables1votesBy kitoskorpy -
Declaration & Initialization1votesBy sanya -
Static Variables1votesBy sanya -
Static variable0votesBy sakimahesh
-
-
Bitwise AND operator396votesBy sakimahesh -
Brief Description of Operators - Arithmetic, Increment/Decrement373votes -
Conditional operator372votesBy sakimahesh -
Logical AND Operator341votesBy sakimahesh -
Brief Description of Operators - Conditional, sizeof, comma177votes -
increment and decrement operator159votes -
Brief Description of Operators - Logical, Relational141votes -
Arithmetic operators115votesBy ramrayster -
Operators110votesBy ramrayster -
Conditional operator110votesBy ramrayster -
Increase109votesBy ramrayster -
Compound assignment89votesBy ramrayster -
operator overloading60votesBy MrProgramr -
Five Special Operators53votesBy sanya -
sizeof Operator49votesBy sanya -
Greatest of three variables by using '&&' and '>' operator48votes -
Arithmetic Operators46votes -
Operator ('+')Overloading45votesBy sanya -
Swapping values using assignment operator44votes -
Unary operators29votesBy justakash_s -
Ternary operator2votesBy ssshuhail -
Not Operator2votesBy ssshuhail -
reading and displaying an array2votesBy tanyx -
Binary Operators1votesBy justakash_s -
Scope Resolution Operator1votesBy justakash_s -
Logical Operators1votesBy kitoskorpy -
Conditional Operator1votesBy kitoskorpy -
Explicit Type Casting Operator1votesBy kitoskorpy -
and operator1votesBy tanyx -
NOT operator1votesBy tanyx -
OR operator1votesBy tanyx -
displaying a single element of an array1votesBy tanyx
-
-
Mixed mode calculation334votesBy sakimahesh -
Power of a number289votesBy justakash_s -
Important Mathematical functions277votesBy justakash_s -
Trigonometric functions152votesBy justakash_s -
Perfect Number127votesBy sakimahesh -
Elementary Data Types for Arithmetic operations82votes -
Standard Operators & Assignments74votes -
Armstrong Number58votes -
Prime Number48votes -
Fibonacci Number46votesBy kitoskorpy -
Binary operators & Implicit Conversions34votes -
Factorial of a number1votesBy imran1991 -
Increment/Decrement operation1votesBy sakimahesh -
Palindrome Number1votes
-
-
Day of the week selector395votesBy justakash_s -
Using Break365votesBy sakimahesh -
Selection Statements346votes -
Goto statement298votesBy sakimahesh -
Conditional structure1145votesBy ramrayster -
The break statement131votesBy ramrayster -
Conditional structure124votesBy ramrayster -
The continue statement108votesBy ramrayster -
Go-To statement57votesBy CodeBreaker1 -
Switch statement45votesBy CodeBreaker1 -
Usage of Continue keyword33votesBy sakimahesh -
If-else statements2votesBy CodeBreaker1 -
if...else condition1votesBy MohitKumar -
switch statement1votesBy poojak -
Positive/Negative number1votesBy justakash_s -
Jump Statements1votes
-
-
Largest value371votesBy sakimahesh -
Pattern making using For loops346votesBy Hiteshdua1 -
Numbers 1-20 using While loop331votesBy justakash_s -
Table of a Number245votesBy justakash_s -
Find using while243votesBy sakimahesh -
While-Loop229votesBy CodeBreaker1 -
The do-while Loop229votes -
The while Loop157votes -
The for Loop151votes -
Power of A Number143votesBy silvercodes -
The do-while loop115votesBy ramrayster -
The for loop115votesBy ramrayster -
The while loop108votesBy ramrayster -
Print a right-triangular pattern of asterisks, using nested for-loop90votesBy justakash_s -
for loop82votesBy mrstinky -
do while loop77votesBy Marcella -
Nested for loop66votesBy sakimahesh -
Do-While loop63votesBy CodeBreaker1 -
Nested Loops55votesBy kitoskorpy -
Iteration Statements34votes -
break Statements2votes -
continue Statement2votes -
do-while Loop2votes -
while..loop1votes -
For-Loop1votesBy CodeBreaker1
-
-
Pointers2170votesBy ramrayster -
Pointer1124votesBy ramrayster -
void pointers121votesBy ramrayster -
Pointers118votesBy ramrayster -
Pointers to functions111votesBy ramrayster -
pointer48votesBy mrstinky -
function pointer2votesBy retundror -
Pointers and arrays2votesBy ramrayster -
pointers0votes
-
-
Constructors221votesBy CodeBreaker1 -
Member Function of class143votesBy CodeBreaker1 -
CreatePersonClass116votesBy webman1 -
Access Specifiers61votesBy justakash_s -
define class1votes -
Modifying a Class with a Friend Function1votesBy shivamd001 -
Classes Introduction1votesBy CodeBreaker1 -
Class Concept1votesBy sakimahesh -
Encapsulation1votesBy sakimahesh -
Class with Members and Object1votesBy justakash_s -
Initialization1votesBy sakimahesh -
Class with Copy initialization1votesBy justakash_s -
Class with Friend function1votesBy justakash_s -
Access Specifier1votesBy justakash_s -
Protected Access Specifier1votesBy justakash_s -
abstract class-1votesBy KingLord007
-
-
Sort a integer arry364votes -
Maximum in array261votesBy sakimahesh -
Two-Dimensional Arrays246votes -
2-D array declaration170votesBy sakimahesh -
Calling Function With Arrays125votes -
Arrays as parameters101votesBy ramrayster -
array-sort92votesBy ramrayster -
Roll numbers and Marks of 5 students73votesBy justakash_s -
Binary Search70votes -
Arrays66votesBy ramrayster -
Two Dimensional Arrays54votesBy sanya -
Array as parameter46votes -
Multidimensional arrays2votes -
Array as parameters2votesBy sanya -
array in cpp1votesBy KingLord007 -
Playing Basic Array1votesBy silvercodes -
Declaration of Arrays1votesBy justakash_s -
Sum of array elements1votesBy justakash_s -
Searching an array1votesBy sakimahesh -
Binary Search Function1votesBy kitoskorpy -
Bubble Sort1votesBy kitoskorpy -
Add two array elements1votesBy sanya -
Single Dimensional Arrays1votes
-
-
Strings as an Array382votes -
Strings Length354votesBy justakash_s -
String anagram350votesBy sakimahesh -
Strings Intro325votesBy CodeBreaker1 -
Lexicographic String278votesBy sakimahesh -
Inbuilt String Functions255votesBy CodeBreaker1 -
String compare and copy254votesBy justakash_s -
Search facilities in Strings192votes -
String Reverse147votesBy justakash_s -
string_order145votes -
String palindrome145votesBy sakimahesh -
append-string128votesBy ramrayster -
Character Sequences127votesBy ramrayster -
Introduction to strings1121votesBy ramrayster -
compare-two-strings120votesBy ramrayster -
Substrings & it's manipulation116votes -
get-string-size110votesBy ramrayster -
Introduction to strings109votesBy ramrayster -
split-string109votesBy ramrayster -
find-a-string106votesBy ramrayster -
Greater Strings97votesBy CodeBreaker1 -
String functions52votesBy Bobby -
String Concatenation43votes -
String Comparison2votes -
Append string1votes -
String Insert Function1votesBy kitoskorpy -
String To Int1votesBy kitoskorpy -
String Find Function1votesBy kitoskorpy
-
-
Bad Allocation Exception1votesBy sakimahesh -
Integer Exception1votesBy sakimahesh -
Division by 0 - Exception Check1votesBy sakimahesh -
Simple Exception Handing Example1votesBy justakash_s -
Exception handling when a function throws an Exception1votesBy justakash_s -
Exception handling with Localized try-catch block1votesBy justakash_s
-
-
private keyword61votesBy mrstinky -
Vector in cpp52votesBy Bobby -
Private access specifier51votesBy sakimahesh -
define structure44votesBy Bobby -
inheritance2votesBy onyxbladeo -
iterating vector2votesBy Bobby -
stack operation2votesBy Bobby -
Type casting2votesBy mrstinky -
Public access specifier1votesBy sakimahesh -
Protected access specifier1votesBy sakimahesh
-
-
Swapping two numbers334votes -
distance between 2 points268votesBy Eng_romioo -
Variable value166votesBy sakimahesh -
Initializing Variables137votes -
Adding Two Numbers135votesBy kitoskorpy -
modulus of variables99votesBy sakimahesh -
Even and odd Variables1votes -
average calculation1votesBy Eng_romioo -
Greater between two variables1votes
-
-
Increment & Decrement Numbers363votesBy kitoskorpy -
Operator ( + )330votesBy kitoskorpy -
Area & Perimeter of Circle256votes -
Leap year254votesBy tanyx -
Salary Estimation based on experience251votes -
Even 3 multiples143votesBy tanyx -
Ternary operator1votes -
Pre and Post Increment Operator1votes -
Basic Operators1votesBy sanya -
Size of integer value-1votesBy sakimahesh
-
-
Add negative, even & odd numbers from a list348votes -
Sum of the digits of a number332votesBy justakash_s -
Convert days to years and weeks321votesBy cassia -
3x3 matrix gradient301votesBy Eng_romioo -
Is it a Prime number?143votesBy sakimahesh -
binary conversion106votesBy Eng_romioo -
Sum of Digits1votes -
Determine whether an year is Leap Year1votesBy justakash_s -
Area of Triangle using Heron's Formula1votesBy justakash_s -
Leap Year Finder1votes -
Factorial evaluation1votesBy sakimahesh -
Palindrome Number1votes
-
-
Press any Key !374votesBy CodeBreaker1 -
Gross Salary Check !351votesBy CodeBreaker1 -
Temperature Converter328votes -
Check String for uppercase315votesBy sakimahesh -
Fibonacci Series306votes -
Triangle or not278votesBy CodeBreaker1 -
Palindrome Number265votes -
Leap Year, Is It ?187votesBy CodeBreaker1 -
Larger of two numbers using Ternary operator107votesBy justakash_s -
Prime number106votesBy justakash_s -
Odd or Even1votesBy sakimahesh -
Day of Week Finder1votes -
Maximum of 3 numbers1votesBy CodeBreaker1
-
-
Factorial of a number399votesBy justakash_s -
Yet Another Pattern !345votesBy CodeBreaker1 -
Display Pattern using Loops285votes -
Triangle Pattern235votesBy CodeBreaker1 -
Printing Average of Positive Numbers99votes -
Factorial46votesBy CodeBreaker1 -
No. divisible by two37votesBy CodeBreaker1 -
Highest Common Factor32votesBy CodeBreaker1 -
Input/Output1votesBy sakimahesh -
Summation1votesBy silvercodes
-
-
Class values268votesBy sakimahesh -
Sum of Complex numbers217votesBy justakash_s -
Student Percentage205votesBy justakash_s -
Calculate Area of Circle122votesBy justakash_s -
Student Information115votesBy justakash_s -
Student Details104votesBy sanya
-
-
most frequent element286votesBy Eng_romioo -
Sort Arrays168votesBy kitoskorpy -
Average Of Numbers155votesBy kitoskorpy -
min & max values125votesBy Eng_romioo -
Sorting of Array1votes -
Insertion at a Specified position in an Array1votes
-
-
Reverse a String331votesBy CodeBreaker1 -
check for correct brakets316votesBy Eng_romioo -
CrAzY Strings251votesBy CodeBreaker1 -
Equal Strings234votesBy kitoskorpy -
Palindrome String191votesBy justakash_s -
Find String186votesBy kitoskorpy -
sting reverse168votesBy Eng_romioo -
Substring Is It?115votesBy CodeBreaker1 -
Encrypted String28votesBy sakimahesh -
Comparing two Strings1votes -
Incrementing String1votes
-
-
Counting number of exceptions347votesBy justakash_s -
Write a try-catch block301votesBy sakimahesh -
Divide by 0248votesBy sakimahesh -
Check for Divide by zero exception73votesBy justakash_s
-
-
Matrix Multiplication399votesBy ArvindCoder -
Average of positive and negative numbers376votesBy ArvindCoder -
Reciprocals Sum average and Product370votes -
Bitwise AND364votesBy sakimahesh -
Constructor value358votesBy sakimahesh -
triangular star355votesBy djkoder -
Diamond Shape350votesBy ArvindCoder -
Reverse Triangle333votesBy ArvindCoder -
Convert binary to decimal331votesBy ArvindCoder -
Cartesian to Polar co-ordinates324votes -
Armstrong Number319votesBy ArvindCoder -
Number Occurrence in Array319votesBy ArvindCoder -
Indian rupees format317votesBy djkoder -
consecutive number305votesBy djkoder -
Leap Year check302votes -
Reverse Floyds Triangle288votesBy ArvindCoder -
Decimal to Octal Conversion285votes -
Find Maximum and Minimum Temperature284votesBy ArvindCoder -
Sum of the digits276votesBy djkoder -
Permutation of Strings275votes -
Sum of Odd Numbers266votes -
Sum of Naturals divisible by 3 and 5266votes -
Fibonacci Series264votesBy djkoder -
Capitalization261votesBy ArvindCoder -
Transpose of Matrix253votes -
Find Day of Given Date239votesBy ArvindCoder -
Ulam Sequence232votesBy ArvindCoder -
Count Occurrence of Character in string224votesBy ArvindCoder -
Count Ones218votes -
Remove Character215votesBy ArvindCoder -
Triangular Numbers212votesBy djkoder -
Decimal to binary covertor209votesBy djkoder -
Pascal Triangle207votesBy ArvindCoder -
Prime Factors203votes -
Euclids GCD Algorithm203votes -
Quadrant of an Angle196votes -
Palindrom String196votesBy ArvindCoder -
TrimSpace191votesBy ArvindCoder -
Name search188votesBy djkoder -
Spring month check177votes -
Gray Code169votes -
statement reverse130votesBy djkoder -
Last Samples of a number129votes -
Number of occurence128votesBy djkoder -
Convert in Seconds116votesBy ArvindCoder -
Find Vowels and Consonants114votesBy ArvindCoder -
ISBN Validation114votes -
Factorial of a given number93votes -
Amicable Total91votes -
check for palindrome number77votesBy shivani17 -
Print Binary Triangle71votesBy ArvindCoder -
Convert to uppercase68votes -
Abundant Numbers65votes -
Is Binary or not64votes -
Sort Three numbers63votes -
String Sort55votesBy ArvindCoder -
number to string format52votesBy djkoder -
Print Rectangle50votesBy ArvindCoder -
date sort50votesBy djkoder -
Wind Chill46votes -
sum of column of a matrix38votesBy djkoder -
Number Sequence28votesBy djkoder -
Word Reverse27votesBy ArvindCoder -
Sexy Pairs21votes -
Multiplication Table1votesBy ArvindCoder -
Reverse Array1votesBy ArvindCoder -
Collatz Sequence-1votes
-
C++ Projects
- 541votes
Word Hunt Game
By silvercodes
Programming Contest Name: January Contest 2011tags: word-game
5706 reads515votesDiamondOfNumbers
By shozabhasan
Programming Contest Name: February Contest 2012
6251 reads506votesMind Speed Game
By silvercodes
Programming Contest Name: January Contest 2011tags: mind-game
5503 reads402votesCRICKET_with_comment...
By karthik
Programming Contest Name: January Contest 2011
4181 reads334votesCharacter to ASCII c...
By silvercodes
Programming Contest Name: February Contest 2012
3092 reads328votesMind Speed Game 1.0
By AutoRunWare
Programming Contest Name: May - July Contest 2012
2363 reads
User login
Add an example to this zone.
Takes < 5 mins!
Top Scorers This week


Run It Now!






