logoalt Hacker News

fulafellast Tuesday at 6:04 AM0 repliesview on HN

Nitpick: In the "static, dynamic, strong, weak" quad, C/C++ are considered weakly but statically typed because you can nonchalantly bypass the type system.

In this case you'd need to be pretty explicit about the bypassing but you could write

  int a = 1;
  strcpy((char *)&a, "hi");
(and it'll even kind of work in this instance since "hi" fits in an int, if on your C/C++ implemnentation int happens to be sized 3 bytes or more)