A comprehensive, well-organized repository containing C and C++ programming exercises, algorithms, and problem-solving solutions. This repository documents a complete learning journey from fundamentals to advanced topics, providing practical examples and structured challenges.
- Overview
- Repository Structure
- Getting Started
- Learning Paths
- Compilation and Execution
- Repository Contents
- Learning Tips
- Contributing
- Learning Resources
- Support
This repository serves as a comprehensive learning resource and reference for C and C++ programming. It is designed to:
- Build foundational knowledge in C++ syntax and programming paradigms
- Master algorithmic thinking through structured problem-solving
- Progress systematically from basic concepts to advanced topics
- Provide clean, well-documented code for learning and reference
- Help others learn with organized and practical examples
The repository contains hundreds of solved problems, from basic algorithmic challenges to complex system-level programming concepts.
ProgrammingAdvicesPFT/
├── Algorithms & Problem-Solving Level 1/
│ └── 49 fundamental problem-solving exercises
├── Algorithms & Problem-Solving Level 2/
│ ├── 44 intermediate to advanced problems
│ └── C_Strings_Manipulation/
├── Programming Using C++ - Level 1/
│ ├── Basic syntax and declarations (ex00-ex26)
│ ├── LoopsExercises/
│ ├── homeWork01-homeWork09/
│ ├── ExerOfWeek/
│ └── SolutionsFlowChartProblem/
├── Programming Using C++ - Level 2/
│ ├── Pointers/
│ ├── References/
│ ├── Dynamic Memory Allocation/
│ ├── Exception Handling/
│ ├── Dealing With Strings/
│ ├── More About Arrays/
│ ├── More About Functions/
│ ├── More About Variables/
│ ├── Vectors Part I/
│ ├── System Call/
│ ├── Debugging C++ Code/
│ ├── Printing & Formatting/
│ ├── MakeFile/
│ ├── Miscellaneous/
│ └── Exrcices/
├── Help/
│ ├── Reference materials
│ ├── PDF guides and documentation
│ └── Code tips and examples
├── .gitignore
└── README.md
You will need a C/C++ compiler installed on your system:
Linux/macOS:
# Ubuntu/Debian
sudo apt update && sudo apt install build-essential
# macOS with Homebrew
brew install gccWindows:
- MinGW: https://www.mingw-w64.org/
- Visual Studio Community: https://visualstudio.microsoft.com/
git clone https://github.com/justshobee/ProgrammingAdvicesPFT.git
cd ProgrammingAdvicesPFT- Choose a learning path that matches your skill level
- Navigate to the appropriate folder
- Compile and run examples as you progress through them
- Consult the Help folder for reference materials when needed
- Start with Algorithms & Problem-Solving Level 1 for foundational problem-solving
- Progress to Programming Using C++ - Level 1 for structured language learning
- Advance to Programming Using C++ - Level 2 for advanced topics
- Challenge yourself with Algorithms & Problem-Solving Level 2 for complex problems
Estimated Duration: 3-6 months with consistent practice
- Start with Algorithms & Problem-Solving Level 1 while learning basics from Programming Using C++ - Level 1
- Deepen understanding with Programming Using C++ - Level 2
- Challenge yourself with Algorithms & Problem-Solving Level 2
Suitable for: Those who prefer learning through problem-solving
Browse individual folders to find specific topics of interest. Each directory contains focused examples and exercises with clear progression.
g++ -o output_name source_file.cpp
./output_nameg++ -std=c++17 -o output_name source_file.cpp
./output_nameg++ -std=c++17 -Wall -Wextra -g -o output_name source_file.cpp
./output_name./output_name < input.txtCompile all C++ files in a directory:
for file in *.cpp
g++ -std=c++17 -o (basename $file .cpp) $file
endFor larger projects, create a Makefile:
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -g
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
TARGET = program
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CXX) $(CXXFLAGS) -o $@ $^
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $<
clean:
rm -f $(OBJECTS) $(TARGET)
.PHONY: all cleanThen compile:
make
make clean49 fundamental problem-solving exercises covering:
- Pattern recognition and output formatting
- Loop-based algorithms
- Number properties (palindromes, digits, sums)
- Basic mathematical operations
- Simple string manipulations
Target: Beginners developing problem-solving skills
44 intermediate to advanced problems with specialized modules:
- Advanced algorithmic thinking
- Complex string manipulation
- Optimization techniques
- Multi-step problem solving
- C-style string operations
Target: Intermediate programmers strengthening algorithmic skills
Structured exercises covering:
- Basic syntax and declarations
- Control flow structures
- Function implementation
- Array and vector operations
- File input/output operations
- Loop exercises
- Homework assignments
Target: Beginners learning C++ fundamentals
Advanced exercises and topics featuring:
- Pointers and references
- Dynamic memory allocation
- Exception handling
- String manipulation
- Data structures and vectors
- File I/O and system calls
- Debugging techniques
- Build systems (Make)
- Start at a difficulty level that matches your current skills
- Type the code yourself rather than copy-pasting
- Modify and experiment with the code to understand it deeply
- Focus on understanding why code works, not just memorizing syntax
- Practice consistently rather than in marathon sessions
- Use the reference materials in the Help folder for difficult concepts
- Use debugging techniques to understand program flow
- Include
-Walland-Wextraflags to catch potential issues - Use
-gflag during development for debugging support - Use
-O2or-O3flags for performance-critical code when optimizing - Test with multiple C++ standards
- Check for memory leaks using tools like Valgrind
Contributions are welcome. Whether you have improvements or new content:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes with clear, well-documented code
- Commit with descriptive messages
- Push and open a pull request
Guidelines:
- Keep code clean and maintainable
- Add meaningful comments for complex logic
- Follow existing naming and formatting conventions
- Test code before submitting
- Use descriptive commit messages
- C++ Reference Documentation: https://en.cppreference.com/
- GeeksforGeeks C++ Tutorials: https://www.geeksforgeeks.org/c-plus-plus/
- Cplusplus.com: http://www.cplusplus.com/
- GCC Documentation: https://gcc.gnu.org/onlinedocs/
If you encounter issues or have questions:
- Check existing issues on GitHub
- Review the Help folder for reference materials
- Open an issue with a detailed description of your problem
Repository: https://github.com/justshobee/ProgrammingAdvicesPFT