Apple helped lead the market and rose 1.4% after reporting stronger profit for the latest quarter than analysts expected.