This project is to study the difference in execution times between C and C++ programs for the subject of Probability and Statistics. We have created two generic codes equivalent in complexity and implementation, one in C and the other in C++. What these two codes do is filling the positions of an initially empty array of random size between 0 and 2²⁰ with the summation of 0 <= n < array size, where n is the array position. At the end of the execution, both codes save the execution time in a .txt format file.
To have a large enough sample and to ensure that the results are completely random and not adulterated by the state of the computer when executing the programs, we created a "parent" program that randomly executed the C or C++ implementation 80 times (50% chance for each). Trying to achieve the randomness of the results, we have also implemented the execution sequentially instead of concurrently, which avoids that the CPU must be distributed among several processes and the computer performance and execution time are affected.