User Tools

Site Tools


cpp_puzzles

Table of Contents

C++ Puzzles

This page provides some programming puzzles to test your skill in C++-programming. If the individual puzzles do not provide all information you require (e.g. use float or double for floating-point numbers), please fill in the gaps on your own and make reasonable assumptions. Please take especially care to make use of C++ mechanisms, and avoid using a C-based coding style.

Puzzle A

Implement a CSV file reader/writer. The CSV data is organized in three columns, each column contains a floating-point value. Store and load a dynamically sized data set (choose the number of data set entries and choose arbitrary initialization values) and implement verification routines to ensure that the loaded data corresponds to the initially stored data set. Seperate the definition and declaration of the reader writer in header/source files. Document the code and provide a Makefile which builds and cleans the program. The size of the data set should be a command-line parameter.

Expected Submission files: 3 source files, 2 header files, 1 Makefile

Puzzle B

Implement a short program which computes the average value and the median value of a set of floating-point values. Document the code and provide a Makefile which builds and cleans the program.

Expected Submission files: 1 source file, 1 Makefile.

Puzzle C (only for ViennaMaterials: Web Interface)

Take a look at The C++ Network Library Project and implement a small http webserver which provide a simple Hello World HTML file for a request. Test your own http webserver with a browser of your choice.

Expected Submission files: 1 source file, 1 Makefile.

cpp_puzzles.txt · Last modified: 2015/03/24 16:02 by viennastar