Skip to content

Repository files navigation

C/C++ Programs Collection

A structured collection of C and C++ programs for learning core programming concepts, systems programming, graphics, digital signal processing, and theoretical computer science.

Repository Overview

This repository brings together multiple learning projects in a single workspace. Each folder explores a different topic and contains standalone examples, utilities, or mini-projects.

Folder Structure

Audio and signal-processing experiments covering:

  • WAV file parsing and validation
  • PCM data handling and volume adjustment
  • PortAudio-based device discovery and playback
  • Practical documentation for digital audio concepts

Core C++ learning examples for:

  • Classes and method chaining
  • Pointers and memory safety
  • References and data manipulation
  • Switch-based flow control
  • Arithmetic and numeric limit demonstrations

Database applications built using C/C++ and MySQL connectivity, including:

  • Database connection logic
  • CREATE/ALTER/DROP operations
  • Query execution examples
  • Simple MySQL-driven user data programs

Graphics and visual output programs demonstrating:

  • Pattern generation
  • Rendering and console graphics techniques
  • Visual experiments and drawing utilities

A terminal-based word-guessing game featuring:

  • Interactive gameplay
  • Word/store handling
  • Debug utilities
  • ANSI-based terminal styling and BST logic

Mathematical formula translation and learning notes focused on:

  • Summation translation to C loops
  • Numerical computation patterns
  • Formula-to-code mapping examples

Theoretical CS and compiler fundamentals, including:

  • Lexical analysis
  • Regular-expression-driven tokenization
  • Finite-state style scanner logic
  • Even/odd input recognition in a lexer grammar

Recent Updates

The most recent additions focus on lexical analysis exercises and scanner implementations:

  • Theory of Computation/lexical analysis/
    • scanner.l demonstrates token recognition for numbers and words
    • odd_even.l checks whether an input number is even or odd
    • Generated lex.yy.c and compiled executables reflect the working sample outputs

Getting Started

Each subfolder contains its own executable programs and documentation. Refer to each folder’s README for detailed explanations and usage notes.

Compilation

For C++ programs:

g++ -o output_file source_file.cpp

For C programs:

gcc -o output_file source_file.c

For Flex/Lex-based lexer programs:

flex -o lex.yy.c source.l
gcc -o output_name lex.yy.c

The current lexer examples define their own yywrap() function, so the build does not require the optional -lfl Flex runtime link.

Execution

./output_name

Notes

  • Many projects are designed as learning examples rather than production systems.
  • Some areas may depend on specific libraries or toolchains such as MySQL, PortAudio, or graphics compatibility layers.
  • Programs are intended to support experimentation, academic study, and hands-on practice.

Author

Programs and experiments developed for learning and demonstration purposes by Tanish Shivhare.

Releases

Packages

Contributors

Languages