132 small C++ programs I wrote while following a Udemy C++ course. Each file is one exercise, and the number at the end of the file name follows the order of the course, so DemoFirstProgram23.cpp comes early and AllAboutThrow227.cpp comes near the end.
- Language basics: operators, conditions,
switch, loops,autoand variadic functions, for exampleDemoLoops71.cppandBitwiseOperators40.cpp. - Number and pattern programs: prime numbers, Armstrong numbers, factorials, factors, reversing a number and drawing patterns.
- Arrays and strings: linear and binary search, maximum elements, palindromes, counting vowels and words.
- Functions: overloading, default arguments and function templates.
- Object-oriented programming: classes, access specifiers, constructors and destructors, inheritance, polymorphism, virtual functions, abstract classes, friend functions and
final. - Pointers and memory: pointers, dynamic allocation, and base class pointers to derived objects.
- Exceptions:
try,throwandcatch.
g++ -std=c++17 PrimeNumber78.cpp -o prime
./prime