# C++ Initial Assessment ## 🎯 Purpose This assessment will help determine your current C++ proficiency level and create a personalized learning path. ## 📋 Assessment Structure ### Part 1: Self-Assessment Questionnaire ### Part 2: Practical Coding Challenges ### Part 3: Knowledge Gap Analysis --- ## Part 1: Self-Assessment Questionnaire Rate yourself honestly on each topic (0-4): - **Level 0:** Never heard of it - **Level 1:** Basic awareness - **Level 2:** Can use with documentation - **Level 3:** Proficient, use confidently - **Level 4:** Expert, can teach others ### C++ Basics | Topic | Level (0-4) | Notes | |-------|-------------|-------| | Variables & Data Types | | | | Operators | | | | Control Flow (if/switch) | | | | Loops (for/while) | | | | Functions | | | | Arrays | | | | Strings (std::string) | | | | Input/Output (cin/cout) | | | | Compilation process | | | ### Pointers & Memory | Topic | Level (0-4) | Notes | |-------|-------------|-------| | Pointer basics | | | | Pointer arithmetic | | | | References | | | | new & delete | | | | Memory management | | | | nullptr | | | | Pass by reference/pointer | | | | Function pointers | | | ### Object-Oriented Programming | Topic | Level (0-4) | Notes | |-------|-------------|-------| | Classes & objects | | | | Constructors/Destructors | | | | Access specifiers | | | | Inheritance | | | | Polymorphism | | | | Virtual functions | | | | Operator overloading | | | | Abstract classes | | | | Multiple inheritance | | | ### Templates | Topic | Level (0-4) | Notes | |-------|-------------|-------| | Function templates | | | | Class templates | | | | Template specialization | | | | Variadic templates | | | | SFINAE | | | | Type traits | | | | Concepts (C++20) | | | ### Modern C++ (C++11/14/17/20) | Topic | Level (0-4) | Notes | |-------|-------------|-------| | auto keyword | | | | Smart pointers | | | | Move semantics | | | | rvalue references | | | | Lambda expressions | | | | Range-based for | | | | constexpr | | | | Structured bindings (C++17) | | | | std::optional/variant | | | ### STL (Standard Template Library) | Topic | Level (0-4) | Notes | |-------|-------------|-------| | vector, list, deque | | | | set, map | | | | unordered containers | | | | Iterators | | | | Algorithms (sort, find, etc.) | | | | Function objects | | | | std::function | | | ### Advanced Topics | Topic | Level (0-4) | Notes | |-------|-------------|-------| | Multithreading (std::thread) | | | | Mutexes & locks | | | | std::atomic | | | | Exception handling | | | | RAII pattern | | | | Custom allocators | | | | Template metaprogramming | | | | Build systems (CMake) | | | | Design patterns | | | --- ## Part 2: Practical Coding Challenges ### Challenge 1: Basic C++ (Beginner) ```cpp // Write a function that takes a vector of integers and returns // a new vector with only the even numbers, sorted in descending order // Example: {5, 2, 8, 1, 9, 4} -> {8, 4, 2} #include std::vector filterAndSort(const std::vector& nums) { // Your code here } // Test int main() { std::vector input = {5, 2, 8, 1, 9, 4}; auto result = filterAndSort(input); // Should print: 8 4 2 return 0; } ``` **Can you solve this?** ☐ Yes ☐ No ☐ With hints --- ### Challenge 2: Pointers & Memory (Intermediate) ```cpp // Implement a dynamic array class that manages its own memory // Should support: add, remove, access by index, size class DynamicArray { private: int* data; size_t capacity; size_t size; public: DynamicArray(); ~DynamicArray(); // Add more methods }; // Implement proper memory management (no leaks!) ``` **Can you solve this?** ☐ Yes ☐ No ☐ With hints --- ### Challenge 3: OOP & Polymorphism (Intermediate) ```cpp // Create a Shape hierarchy with: // - Abstract Shape base class with virtual area() and perimeter() // - Circle, Rectangle, Triangle derived classes // - Demonstrate polymorphism with a vector of Shape pointers class Shape { public: virtual double area() const = 0; virtual double perimeter() const = 0; virtual ~Shape() = default; }; // Implement derived classes and demonstrate usage ``` **Can you solve this?** ☐ Yes ☐ No ☐ With hints --- ### Challenge 4: Templates (Advanced) ```cpp // Write a template function that works with any container // and returns the sum of all elements template auto sum(const Container& cont) { // Your code here // Should work with vector, list, array, etc. } // Test std::vector v = {1, 2, 3, 4, 5}; std::list l = {1.5, 2.5, 3.5}; // Should compile and work for both ``` **Can you solve this?** ☐ Yes ☐ No ☐ With hints --- ### Challenge 5: Modern C++ (Advanced) ```cpp // Implement a simple unique_ptr from scratch // Must support: move semantics, custom deleters, operator*, operator-> template> class MyUniquePtr { private: T* ptr; Deleter deleter; public: // Implement move constructor, move assignment, etc. // Should be move-only (no copy) }; ``` **Can you solve this?** ☐ Yes ☐ No ☐ With hints --- ### Challenge 6: Concurrency (Expert) ```cpp // Implement a thread-safe queue using std::mutex and std::condition_variable // Should support: push (blocking/non-blocking), pop (blocking), empty check template class ThreadSafeQueue { private: std::queue queue; std::mutex mutex; std::condition_variable cv; public: void push(T value); T pop(); // Blocks if empty bool tryPop(T& value); // Non-blocking bool empty() const; }; ``` **Can you solve this?** ☐ Yes ☐ No ☐ With hints --- ## Part 3: Knowledge Gap Analysis ### Based on Self-Assessment **Count your scores:** - Topics at Level 0: ___ - Topics at Level 1: ___ - Topics at Level 2: ___ - Topics at Level 3: ___ - Topics at Level 4: ___ **Total topics assessed:** ___ ### Based on Coding Challenges **Challenges solved:** - Challenge 1 (Basic): ☐ - Challenge 2 (Pointers): ☐ - Challenge 3 (OOP): ☐ - Challenge 4 (Templates): ☐ - Challenge 5 (Modern C++): ☐ - Challenge 6 (Concurrency): ☐ **Total solved:** ___ / 6 --- ## 📊 Assessment Results & Recommendations ### Proficiency Level Determination **If you scored:** #### Absolute Beginner (0-20% Level 2+, 0 challenges) - **Recommendation:** Start with Phase 1 (Foundations) - **Timeline:** 3-4 months for Phase 1 - **Focus:** Master basics, pointers, and basic OOP - **Study Time:** 2-3 hours daily - **Resources:** "C++ Primer", learncpp.com #### Beginner (20-40% Level 2+, 1-2 challenges) - **Recommendation:** Review Phase 1, focus on Phase 2 - **Timeline:** 1 month review + 3-4 months Phase 2 - **Focus:** Strengthen OOP, learn templates basics - **Study Time:** 2-3 hours daily - **Resources:** "Effective C++", cppreference.com #### Intermediate (40-60% Level 2+, 3-4 challenges) - **Recommendation:** Phase 2-3 (OOP to Modern C++) - **Timeline:** 2 months Phase 2 + 4-5 months Phase 3 - **Focus:** Templates, STL, Modern C++ features - **Study Time:** 2-4 hours daily - **Resources:** "The C++ Programming Language", "C++17 STL Cookbook" #### Advanced (60-80% Level 2+, 5 challenges) - **Recommendation:** Phase 3-4 (Modern to Advanced) - **Timeline:** 2 months Phase 3 + 4-5 months Phase 4 - **Focus:** Concurrency, performance, advanced patterns - **Study Time:** 2-4 hours daily - **Resources:** "C++ Concurrency in Action", "Modern C++ Design" #### Expert (80%+ Level 3+, 6 challenges) - **Recommendation:** Phase 4-5 (Advanced to Specialization) - **Timeline:** 2 months Phase 4 + specialization - **Focus:** Deep expertise in chosen domain - **Study Time:** 1-2 hours daily (maintenance + specialization) - **Resources:** C++ standards documents, source code reading --- ## 🎯 Personalized Learning Path ### Your Starting Point **Based on assessment:** _______________ (Fill after completing) ### Recommended Phase **Start at Phase:** _______________ ### Topics to Review First 1. _______________ 2. _______________ 3. _______________ ### Topics to Skip (Already Mastered) 1. _______________ 2. _______________ 3. _______________ ### Weak Areas to Focus On 1. _______________ 2. _______________ 3. _______________ ### Estimated Timeline to Expert **From your starting point:** ___ months --- ## 📝 Action Items ### Immediate Next Steps (This Week) 1. ☐ Complete this assessment 2. ☐ Set up C++ development environment 3. ☐ Install compiler (GCC/Clang/MSVC) 4. ☐ Choose IDE (VS Code/Visual Studio/CLion) 5. ☐ Write and compile "Hello World" 6. ☐ Review recommended phase in Master Plan 7. ☐ Join C++ community (r/cpp, C++ Slack) ### First Month Goals 1. ☐ Complete ____ modules 2. ☐ Build ____ small projects 3. ☐ Read ____ chapters from recommended book 4. ☐ Solve 20 coding problems 5. ☐ Take monthly comprehensive exam --- ## 🔄 Reassessment Schedule - **Week 4:** Quick progress review - **Month 3:** Comprehensive reassessment - **Month 6:** Mid-journey assessment - **Month 12:** Full reassessment - **Month 18:** Expert level assessment --- ## 📚 Additional Resources ### Online Assessments - HackerRank C++ Certification - LeetCode C++ Problems - Codewars C++ Kata - C++ Quiz at cppreference ### Practice Platforms - LeetCode (algorithms) - HackerRank (C++ track) - Codewars (C++ challenges) - Project Euler (math problems) - Exercism (mentored practice) ### Books by Level - **Beginner:** "C++ Primer" by Lippman - **Intermediate:** "Effective C++" by Scott Meyers - **Advanced:** "The C++ Programming Language" by Stroustrup - **Expert:** "Modern C++ Design" by Alexandrescu --- **Date Completed:** _______________ **Next Reassessment:** _______________ **Notes:** _______________________________________________ _______________________________________________