Sniffing out a rotten egg from the dozen
Yep. Rotten eggs float, fresh eggs sink.

This is because eggshells are porous, so over time water vapour and gases leak out, reducing the egg's mass.

A fresh egg will lie on its side on the bottom of a glass of water. The older the egg, the more it sits up, until it's floating.