By Rex Crum, MarketWatch

SAN FRANCISCO (MarketWatch) -- Apple Inc. posted its highest close in almost a year on a day that mostly saw gains across the tech sector. H-P closed Tuesday with a slight loss, but then rallied in after-hours trading after reporting a profit in the latest quarter.

Apple (AAPL) shares rose $9.66, or almost 2%, to close at $533.40, the highest finish for the iPhone and iPad maker since Dec. 2012.

In addition to Apple, many social media stocks closed with gains Tuesday following the prior-day's losses. Yelp Inc. (YELP) rose 6.4%, to $61.92; Pandora Media Inc. (P) climbed by almost 3%, to $28.79; Facebook Inc. (FB) rose 2.4%, to close at $45.89 and Twitter Inc. (TWTR) gained nearly 3% to end the day at $40.18.

Palo Alto Networks Inc. (PANW) shares rose more than 7%, to close at $49.49 a day after the network-security technology company reported upbeat quarterly results.

The tech-sector gains helped push the Nasdaq Composite Index (RIXF) up by more than 23 points to 4,017, while the Philadelphia Semiconductor Index (SOX) rose almost 1%.

H-P (HPQ) was last up nearly 7% in after-hours trade. After the market closed, H-P reported a fiscal fourth-quarter profit of $1.01 a share on $29.1 billion in revenue. Analysts surveyed by FactSet had forecast H-P to earn $1 a share on revenue of $27.86 billion.

H-P's results also come following mixed results from IBM Corp. (IBM) and Cisco Systems Inc. (CSCO), and amid growing concerns about the turnaround efforts launched by Chief Executive Meg Whitman.

Videogame publisher Take-Two Interactive Software Inc. (TTWO) fell by 92 cents a share, or more than 5%, to $16.01 after the company said it would buy back more than 12 million shares of its stock owned by activist investor Carl Ichan for $203.5 million. Three Take-Two directors that were nominated by Icahn also resigned from Take-Two's board.

Follow Rex Crum on Twitter @mktwcrum

More in Technology:

Take-Two Interactive shares slide on Icahn buyback

Apple's latest deal is a gesture to the future

Online shopping sales seen jumping 15%

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

TakeTwo Interactive Soft... (NASDAQ:TTWO)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more TakeTwo Interactive Soft... Charts.
TakeTwo Interactive Soft... (NASDAQ:TTWO)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more TakeTwo Interactive Soft... Charts.