This page lists the conditional structures offered by different programming languages. Common conditional structures are if-then-else and switch. Tem
Continue ReadingC++: Address of a Variable
Get the address Note that void* is a "pure" address which doesn't carry the type information anymore. If you need the type information (e.g. to recov
Continue ReadingC++: CSV to HTML Translation
Consider a simplified CSV format where all rows are separated by a newline and all columns are separated by commas. No commas are allowed as field dat
Continue ReadingC++: Globally Replace Text in Several Files
The task is to replace every occurring instance of a piece of text in a group of text files with another one. For this task we want to replace the tex
Continue ReadingC++: Delegate Behavior to Derived Classes
INTENT Delegate behavior to derived classes without incurring the cost of run-time polymorphism. DESCRIPTION With the Curiously Recurring Tem
Continue ReadingC++: File Size
In this task, the job is to verify the size of a file called "input.txt" for a file in the current working directory and another one in the file syste
Continue ReadingC++ Puzzles/Games
[pt_view id="fa2c5f1466"]
Continue ReadingC++: Casting Out Nines
A task in three parts: Part 1 Write a procedure (say co9(x)) which implements Casting Out Nines as described by returning the checksum for x.
Continue ReadingC++: Downward For Loop
Write a for loop which writes a countdown from 10 to 0. for(int i = 10; i >= 0; --i) std::cout << i << "\n"; SOURCE Con
Continue ReadingC++: Binary Search Tree Verification
struct TreeNode { int data; TreeNode *left; TreeNode *right; }; bool isBST(TreeNode *node, int minData, int maxData) { if(node == NULL
Continue Reading




