The company’s profit rose 11% to $24.7 billion, beating Wall Street’s expectations and its own forecast.