DEV Community

Suman Samanta
Suman Samanta

Posted on

Day 3 of #100DaysOfCode

Today I Learned (Functions + Binary Numbers in C++)

  • Revisited functions in C++: syntax, parameters, return types
  • Explored local vs global scope and function overloading

  • Practiced:

    • Factorial using functions
    • isPrime(int) returning true/false
    • Binomial Coefficient calculation
    • Found all primes in a range
  • Dived into the Binary Number System

    • Decimal → Binary conversion
    • Binary → Decimal conversion
  • Learned about data type modifiers: signed, unsigned, short, long, long long

Wrote clean code for binary ↔ decimal conversions

Takeaway

Functions simplify logic, and binary concepts strengthen core understanding.

Codes: https://github.com/GeekyProgrammer07/DSA

Image description
Image description
Image description
Image description
Image description
Image description

Top comments (0)