North Carolina, the 10th-ranked state in terms of population, ranked 31st in the foreclosure rankings, according to RealtyTrac.