Official data shows China's consumer prices gained for the fourth straight month in May in the latest sign of a steady domestic demand recovery.