3

Professor: How could you write a program in C to prevent the titanic from sinking?

Me: float Titanic;

😅😅

Comments
  • 4
    Don't use stdio, so water can't get in
  • 1
    They probably did that but Titanic didnt support floating point operations in hw. So they did the classic shift left, do math and then put in the decimal point accordingly. Must've overflown at the shift I guess.. so boundary checks around icebergs would help?
Add Comment