CPP

51
1897 reads

February 20, 2013

Floating point outputs


Here in this c++ example we perform basic operations to floating values and set its precision and experiment with floating point output.

30
2210 reads

February 20, 2013

Calculations


Here the various calculations are being demonstrated.

23
2045 reads

February 20, 2013

Random Integer


To generate a random number we use an inbuilt function rand()

31
2155 reads

February 20, 2013

Const keyword


Variables declared with ‘const’ added, become constants and cannot be altered by the program.

32
2185 reads

February 20, 2013

Assignment operator


Here the use of assignment operator is being demonstrated.

36
2293 reads

February 20, 2013

Integer variables


Here the code demonstrates the working of integer variable.

27
2352 reads

February 20, 2013

Arithmetic calculations


Here all the arithmetic operations are performed and manipulations are done to output as well.

39
3262 reads

February 20, 2013

Basic Calculations


The above c++ code demonstrates various arithmetic calculations.

91
1738 reads

February 20, 2013

Throwing Class Objects


The following examples shows, how an exception by a class object is thrown and handled by the handler. Trouble() is the constructor of class Trouble, and it is thrown as an exception.

121
3949 reads

February 20, 2013

Escape Sequences


Here we have created a C++ program that demonstrates escape sequences in C++.