Skip to content

sagarnikam123/C-kide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

C-kide

License: MIT

Simple kadya (funny programs) in C

ASCII art patterns and interactive programs written during M.Sc studies

Description

  • All programs & codes developed during M.Sc (Bioinformatics) for 'Programming in C', Semester-II, Year 2010-2011
  • All coding done on last corner Windows (Vista) desktop, near window, in practical Lab No.1 at Bioinformatics Center, University of Pune
  • Collection of creative ASCII art patterns and interactive console programs

Prerequisites

macOS/Linux:

# Check if compiler is installed
gcc --version

# If not installed (macOS)
xcode-select --install

Windows:

Quick Start

๐Ÿš€ Easy Way (Recommended)

# Build all patterns
make all

# Run a specific pattern
./bin/basic/hello_world
./bin/geometric/patang
./bin/symbols/lambda

# Run all patterns
make run-all

๐Ÿ› ๏ธ Manual Compilation

# Compile specific category
make geometric

# Compile single file
gcc -Wall src/cross_platform/basic/hello_world.c -o bin/basic/hello_world

File Structure

C-kide/
โ”œโ”€โ”€ README.md                    # This file
โ”œโ”€โ”€ LICENSE                      # MIT License
โ”œโ”€โ”€ Makefile                     # Build automation
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ windows/                 # Original Windows files (historical)
โ”‚   โ””โ”€โ”€ cross_platform/          # Mac/Linux compatible files
โ”‚       โ”œโ”€โ”€ basic/               # Basic programs
โ”‚       โ”‚   โ””โ”€โ”€ hello_world.c
โ”‚       โ”œโ”€โ”€ geometric/           # Geometric patterns
โ”‚       โ”‚   โ”œโ”€โ”€ patang.c         # Kite pattern
โ”‚       โ”‚   โ”œโ”€โ”€ damru.c          # Hourglass pattern
โ”‚       โ”‚   โ”œโ”€โ”€ triangle_*.c     # Triangle patterns
โ”‚       โ”‚   โ””โ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ symbols/             # Symbol patterns
โ”‚       โ”‚   โ”œโ”€โ”€ lambda.c         # Lambda symbol
โ”‚       โ”‚   โ”œโ”€โ”€ bluetooth.c      # Bluetooth logo
โ”‚       โ”‚   โ””โ”€โ”€ arrow_bada.c     # Arrow pattern
โ”‚       โ”œโ”€โ”€ interactive/         # Interactive programs
โ”‚       โ”‚   โ”œโ”€โ”€ harami_ka_mall_atm.c      # ATM simulator
โ”‚       โ”‚   โ”œโ”€โ”€ alpha_numeric_kashish.c   # Number printer
โ”‚       โ”‚   โ””โ”€โ”€ ...
โ”‚       โ””โ”€โ”€ complex/             # Complex patterns
โ”‚           โ””โ”€โ”€ square_by_triangle.c
โ”œโ”€โ”€ bin/                         # Compiled executables (auto-generated)
โ”œโ”€โ”€ docs/                        # Documentation
โ”‚   โ””โ”€โ”€ compilation_guide.md     # Detailed compilation guide
โ””โ”€โ”€ scripts/                     # Build utilities
    โ””โ”€โ”€ build_all.sh            # Build script

๐Ÿ“ Pattern Categories

๐ŸŒŸ Basic Programs

File Description Difficulty
hello_world.c Basic Hello World โญ

๐Ÿ”บ Geometric Patterns

File Description Difficulty
patang.c Kite pattern โญโญ
damru.c Hourglass/drum โญโญ
khidki.c Window frame โญโญ
triangle_bhariv_right.c Right triangle โญโญ
blank_triangle_left.c Hollow triangle โญโญโญ
curved_lines.c Curved line patterns โญโญ

๐Ÿ”ฃ Symbol Patterns

File Description Difficulty
lambda.c Lambda symbol โญโญ
bluetooth.c Bluetooth logo โญโญโญ
arrow_bada.c Arrow pattern โญโญ

๐ŸŽฎ Interactive Programs

File Description Difficulty
harami_ka_mall_atm.c ATM simulator โญโญโญโญ
alpha_numeric_kashish.c Alphabet/Number printer โญโญโญ
aakash_me_atgc.c Stars animation โญโญโญ

๐Ÿงฉ Complex Patterns

File Description Difficulty
square_by_triangle.c Square from triangles โญโญโญ

Pattern Outputs

Patang (Kite):

*          
 *         
  *        
   *       
    *      
     *     
      *   *
       * **
        ***
       ****
      *****

Damru (Hourglass):

 *                   *
 * *               * *
 *   *           *   *
 *     *       *     *
 *       *   *       *
 *         *         *
 *       * * *       *
 *     *   *   *     *
 *   *     *     *   *
 * *       *       * *
 *         *         *

Build Commands

Make Targets

make all         # Compile all programs
make basic       # Compile basic programs only
make geometric   # Compile geometric patterns only
make symbols     # Compile symbol patterns only
make interactive # Compile interactive programs only
make complex     # Compile complex patterns only
make run-all     # Compile and run all programs
make clean       # Remove compiled binaries
make help        # Show help

Manual Compilation

# Single file
gcc -Wall -std=c99 src/cross_platform/basic/hello_world.c -o bin/basic/hello_world

# With debugging
gcc -g -Wall -std=c99 src/cross_platform/geometric/patang.c -o bin/geometric/patang

# Optimized
gcc -O2 -Wall -std=c99 src/cross_platform/symbols/lambda.c -o bin/symbols/lambda

๐ŸŽฏ Learning Path

Recommended progression:

  1. Basic โ†’ Start with hello_world.c
  2. Geometric โ†’ Learn loops with patang.c, damru.c
  3. Symbols โ†’ Practice complex conditions with lambda.c
  4. Interactive โ†’ User input with alpha_numeric_kashish.c
  5. Complex โ†’ Advanced patterns with square_by_triangle.c

๐ŸŒ Online Compilers

For any file, comment these lines:

// #include<conio.h>
// getch();

Then copy code to:

๐Ÿค Contributing Guidelines

Adding New Patterns

  1. Choose appropriate category (basic/, geometric/, symbols/, interactive/, complex/)
  2. Follow snake_case naming: pattern_name.c
  3. Add to both src/windows/ and src/cross_platform/category/
  4. Update README.md pattern table
  5. Test compilation: make category

Code Structure

/*
    Pattern Name
    Brief description of what it creates
*/

#include<stdio.h>
#include<conio.h>  // Windows only

int main(){
    // Your pattern logic here
    
    getch();  // Windows only
    return 0;
}

๐ŸŽฏ Learning Objectives

  • Loops: Nested for loops for pattern generation
  • Conditionals: Complex if-else logic for shapes
  • ASCII Art: Creative use of characters for visual output
  • User Input: Interactive console programs
  • Problem Solving: Mathematical thinking for geometric patterns
  • Code Organization: Structured project layout

๐Ÿ“ž Support

  • Issues: Report bugs or request features via GitHub issues
  • Documentation: See docs/compilation_guide.md for detailed instructions
  • Build Problems: Try make clean && make all

All patterns are creative programming exercises demonstrating loops, conditionals, and ASCII art generation in C.

About

simple kadya (funny programms) in C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published