This repository contains solutions to a set of C++ practice questions. Each question is implemented in its own source file (e.g., question1.cpp, question2.cpp, etc.) and is designed to help reinforce fundamental C++ programming concepts such as input/output, arrays, functions, control flow, and more. These exercises are ideal for beginners or anyone looking to strengthen their C++ basics.
Additionally, the repository includes a folder of screenshots as proof of completion of a separate Codility lesson focused on Data Structures and Algorithms (DSA). These screenshots are unrelated to the C++ practice questions but serve as evidence of DSA proficiency.
question1.cpptoquestion6.cpp: C++ source files, each containing a solution to a different practice question.CMakeLists.txt: Build configuration for CMake.cmake-build-debug/: Directory containing build outputs and executables.codility-screenshots/: Contains screenshots as proof of completing a Codility DSA lesson (not related to the C++ questions).
- CMake (version 3.10 or higher recommended)
- A C++ compiler (e.g., MSVC, MinGW, or Clang)
- Open a terminal (PowerShell) and navigate to the project directory:
cd C:\Users\janny\CLionProjects\CPP-DSA - Create a build directory (if not already present):
mkdir cmake-build-debug cd cmake-build-debug
- Run CMake to configure the project:
cmake ..
- Build the project:
cmake --build .
After building, you will find executables (e.g., question1.exe, question2.exe, etc.) in the cmake-build-debug directory. To run a specific solution:
./question1.exeReplace question1.exe with the desired executable.
- question1.cpp: Program to calculate the number of seconds in a user-specified number of days.
- question2.cpp: Program to compute the volume of a sphere given its radius.
- question3.cpp: Program using functions to compute the area and perimeter of a square.
- question4.cpp: Program using functions to determine if a character is uppercase or lowercase.
- question5.cpp: Program translating a pseudocode loop and arithmetic logic into C++.
- question6.cpp: Program to input 5 values into an array and calculate their average.
Note: Each file contains a comment at the top describing the specific practice question it solves.
This folder contains screenshots as proof of completing a Codility lesson focused on Data Structures and Algorithms. These are not related to the C++ practice questions but are included as evidence of DSA learning and achievement.
- The project is intended for educational purposes and C++ practice.
- Ensure your compiler supports at least C++11 (C++17 recommended).
- If you encounter build issues, verify your CMake and compiler installations.
Feel free to contribute or modify the solutions as needed!