Skip to content

justshobee/ProgrammingAdvicesPFT

Repository files navigation

Programming Advice: C and C++ Learning Repository

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.

Table of Contents

Overview

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.

Repository Structure

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

Getting Started

Prerequisites

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 gcc

Windows:

Clone the Repository

git clone https://github.com/justshobee/ProgrammingAdvicesPFT.git
cd ProgrammingAdvicesPFT

First Steps

  1. Choose a learning path that matches your skill level
  2. Navigate to the appropriate folder
  3. Compile and run examples as you progress through them
  4. Consult the Help folder for reference materials when needed

Learning Paths

Path 1: Complete Beginner to Intermediate

  1. Start with Algorithms & Problem-Solving Level 1 for foundational problem-solving
  2. Progress to Programming Using C++ - Level 1 for structured language learning
  3. Advance to Programming Using C++ - Level 2 for advanced topics
  4. Challenge yourself with Algorithms & Problem-Solving Level 2 for complex problems

Estimated Duration: 3-6 months with consistent practice

Path 2: Problem-Solving Focus

  1. Start with Algorithms & Problem-Solving Level 1 while learning basics from Programming Using C++ - Level 1
  2. Deepen understanding with Programming Using C++ - Level 2
  3. Challenge yourself with Algorithms & Problem-Solving Level 2

Suitable for: Those who prefer learning through problem-solving

Path 3: Topic-Specific Learning

Browse individual folders to find specific topics of interest. Each directory contains focused examples and exercises with clear progression.

Compilation and Execution

Basic Compilation

g++ -o output_name source_file.cpp
./output_name

Compilation with C++17 Standard

g++ -std=c++17 -o output_name source_file.cpp
./output_name

Compilation with Debugging and Warnings

g++ -std=c++17 -Wall -Wextra -g -o output_name source_file.cpp
./output_name

Running with Input Redirection

./output_name < input.txt

Batch Compilation

Compile all C++ files in a directory:

for file in *.cpp
    g++ -std=c++17 -o (basename $file .cpp) $file
end

Using Makefile

For 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 clean

Then compile:

make
make clean

Repository Contents

Algorithms & Problem-Solving Level 1

49 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

Algorithms & Problem-Solving Level 2

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

Programming Using C++ - Level 1

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

Programming Using C++ - Level 2

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)

Learning Tips

  1. Start at a difficulty level that matches your current skills
  2. Type the code yourself rather than copy-pasting
  3. Modify and experiment with the code to understand it deeply
  4. Focus on understanding why code works, not just memorizing syntax
  5. Practice consistently rather than in marathon sessions
  6. Use the reference materials in the Help folder for difficult concepts
  7. Use debugging techniques to understand program flow

Compilation Best Practices

  • Include -Wall and -Wextra flags to catch potential issues
  • Use -g flag during development for debugging support
  • Use -O2 or -O3 flags for performance-critical code when optimizing
  • Test with multiple C++ standards
  • Check for memory leaks using tools like Valgrind

Contributing

Contributions are welcome. Whether you have improvements or new content:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Make your changes with clear, well-documented code
  4. Commit with descriptive messages
  5. 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

Learning Resources

Support

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

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors