This task is about copying a string. Where it is relevant, distinguish between copying the contents of a string versus making an additional reference
Continue ReadingC++ Language Concepts
[pt_view id="016a1aed85"]
Continue ReadingC++: Quicksort
#include <functional> #include <algorithm> #include <iterator> template< typename BidirectionalIterator, typename Compar
Continue ReadingC++: Lucas-Lehmer Test
Lucas-Lehmer Test: for p an odd prime, the Mersenne number 2p − 1 is prime if and only if 2p − 1 divides S(p − 1) where S(n + 1) = (S(n))2 − 2
Continue ReadingC++: Formatted Numeric Output
Express a number in decimal as a fixed-length string with leading zeros. For example, the number 7.125 could be expressed as "00007.125". #inc
Continue ReadingC++: Flow-Control Structures
In this task, we document common flow-control structures. One common example of a flow-control structure is the goto construct. Note that Conditional
Continue ReadingC++: Currying
Create a simple demonstrative example of Currying in the specific language. Currying may be achieved in C++ using the Standard Template Library fun
Continue ReadingC++: CRC-32
Demonstrate a method of deriving the Cyclic Redundancy Check from within the language. The result should be in accordance with ISO 3309, ITU-T V.42,
Continue ReadingC++: Black Scholes Put Option Delta
// Calculate the Black Scholes European put option Delta double BS_Put_Option_Delta(double S, double K, double r, double v, double T) // Parame
Continue ReadingC++: For Loop with a Specified Step
Demonstrate a for-loop where the step-value is greater than one. This prints all odd digits: for (int i = 1; i < 10; i += 2) std::cout &
Continue Reading




