A wave of car bombs ripped through Iraq's capital, the deadliest attacks in nationwide violence that killed 40 people on Tuesday as Iraq grapples with surging unrest.