Skip to content

Instantly share code, notes, and snippets.

View Shookems's full-sized avatar

Sh00k3ms Shookems

View GitHub Profile
@Shookems
Shookems / Quirks of C.md
Created March 17, 2022 20:26 — forked from fay59/Quirks of C.md
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
# This code calculates how long it will take to save
# for a down payment on a home
# cost of the house
total_cost = float(input("Enter the cost of the house: "))
print(total_cost)
# Percentage of the cost of the house needed for downpayment
portion_down_payment = float(input("Enter the percentage needed for downpayment:"))
@Shookems
Shookems / house_savings.py
Created November 10, 2021 21:38
fixed code fixed code
# This code calculates how long it will take to save
# for a down payment on a home
# cost of the house
total_cost = float(input("Enter the cost of the house: "))
print(total_cost)
# Percentage of the cost of the house needed for downpayment
portion_down_payment = float(input("Enter the percentage needed for downpayment:"))
@Shookems
Shookems / house_savings.py
Created November 10, 2021 21:03
fixed code
# This code calculates how long it will take to save
# for a down payment on a home
# cost of the house
total_cost = float(input("Enter the cost of the house: "))
print(total_cost)
# Percentage of the cost of the house needed for downpayment
portion_down_payment = float(input("Enter the percentage needed for downpayment:"))
@Shookems
Shookems / keybase.md
Created March 1, 2020 12:27
Public verification of account

Keybase proof

I hereby claim:

  • I am sh00k3ms on github.
  • I am sh00k3ms (https://keybase.io/sh00k3ms) on keybase.
  • I have a public key ASCNv9pmkzGXt7iA5yZYlbTLctnG9u_gMtw4cYZSlNxI9Qo

To claim this, I am signing this object: