Apple climbed during regular trading, closing up $4.56, or 9 percent, at $53.50. But its after-hours earnings warning sent the stock plunging by more than 40 percent.
Prior to Apple's warning, investors appeared to shake off a string of recent earnings warnings.
After falling for six straight days, the Nasdaq composite index gained 121.98, or 3 percent, to close at 3,778.28. The Standard & Poor's 500 index climbed 31.72, or 2 percent, to 1,458.29 after sliding for seven days in a row.
The Dow Jones industrial average rose 195.70, or 2 percent, to 10,824.06 led by Procter & Gamble, which rose $5.19 to $66.94.
"The shock of preannouncement season has hit, and the market has weathered it pretty well," said Brian Conroy, head of listed trading at J.P. Morgan. "There's the perception that the market is oversold...and people are hoping for a bounce."
Conroy added that investors were hopeful for reversals of the deflated euro and of inflated oil prices. Some of the buying is also considered normal market action as the quarter draws to a close.
"Stocks tend to go up at the end of the quarter as people readjust their positions," Conroy said.
Large-capitalization tech stocks posted a solid day. At the end of regular trading, Intel was up 56 cents at $44.44, Microsoft rose 69 cents to $61.31, and Cisco Systems climbed $2.13 to $59.44.
Both Nortel Networks and Cisco were downgraded to "market perform" from "outperform" by analyst Paul Sagawa at Sanford C. Bernstein. Nortel, however, rose $2.63 to $62.25.
"The ability of the markets to withstand downgrades of Nortel and Cisco bolstered confidence," said Bill Meehan, chief market analyst at Cantor Fitzgerald Brokerage.
The CNET tech index rose 89.42 to 2,935.97. Winners outpaced losers, with 82 of the 97 stocks in the index rising, 14 falling and one remaining unchanged.
Every one of the 18 sectors tracked by CNET Investor posted gains. Internet e-tailers led the charge, rising nearly 6 percent. That sector was followed by server-hardware makers, which gained nearly 5 percent. Wireless companies brought up the rear, rising almost 1 percent.
Shares of some Internet companies climbed higher.
Yahoo rose $5.31 to $95.69 after favorable analyst comments. Shares of eBay rose $5.63 to $69.13, while Internet incubator CMGI rose $3.25, or 12 percent, to $29.88.
Online health site WebMD today said its board has approved a companywide restructuring that will result in the elimination of roughly 1,100 jobs. WebMD employs approximately 6,000 people. Wall Street reacted positively to the news, sending the stock up $2.75, or 24 percent, to $14.
Among members of the CNET tech index, computer maker Gateway rose $6.86, or 14 percent, to $55.90. RealNetworks rose $4.13, or 11 percent, to $40.38
Exodus Communications today said it will acquire rival GlobalCenter, a unit of international network operator Global Crossing, for $6.5 billion in stock, creating a Web hosting powerhouse. Exodus fell $4.13 to $49.13; Global Crossing rose $2 to $31.88.
The acquisition gives Exodus a network it can use to deliver its hosting services. As part of deal, Global Crossing will become the network operator for traffic from Exodus' data centers.
The Philadelphia semiconductor index rose 36.82, or 4 percent, to 901.54, led by chip-equipment maker KLA-Tencor, which gained $4.44, or nearly 11 percent, to $45.31.