Does corticosteroids cause stomach ulcers?

They may. Especially high dose oral corticosteroids like Prednisone taken for longer periods of time. Inhaled corticosteroids used for the treatment of asthma and allergic rhinitis rarely, if ever, cause or exacerbate existing stomach ulcers.
Yes. Yes, especially if taken for a longer time and in a higher dose. We are talking about systemic corticosteroids - by mouth or vein. A proton pump inhibitor among other medications may help prevent this, and is commonly prescribed together with the corticosteroids.