BlackBerry shares rise on surprise profit

Investors undeterred by falling sales in fourth quarter