Stocks snapped a three-day slide on Monday as signs that Federal Reserve Chairman Ben Bernanke would win a Senate vote for a second term helped ease investors' concerns.

With bellwether Apple Inc set to post quarterly results after the bell, investors bid up big-cap technology shares, which tumbled on Friday as part of Wall Street's worst three-day slide in 10 months.

Apple shares rose 2.6 percent to $202.87.

U.S. lawmakers looked likely to approve Bernanke's nomination after the White House defended his record fighting the financial crisis in an effort to rally votes.

(Bernanke) is clearly what prompted it, said Stephen Massocca, managing director at Wedbush Morgan in San Francisco, referring to the stock market's recovery. Coupled with the fact we were 600 points down in a straight line, we were due for a bounce.

Massocca said private counts of Bernanke's support showed well more than a majority of senators would vote for confirmation.

The Dow Jones industrial average <.DJI> gained 23.88 points, or 0.23 percent, to 10,196.86. The Standard & Poor's 500 Index <.SPX> added 5.02 points, or 0.46 percent, to 1,096.78. The Nasdaq Composite Index <.IXIC> rose 5.51 points, or 0.25 percent, to 2,210.80.

IBM climbed 0.5 percent to $126.12 while Hewlett-Packard Co added 1.6 percent to $50.06 and were among the top performers on the Dow. The PHLX Semiconductor index <.SOXX> gained 1.4 percent.

Both the Dow and Nasdaq briefly turned negative after data from the National Association of Realtors showed sales of previously owned U.S. homes fell at a record pace in December, highlighting the housing market's reliance on government aid.

Homebuilder Toll Brothers Inc shed 0.7 percent to $18.15.

Shares of natural resource companies also rebounded, lifting the S&P materials index <.GSPM> up 0.8 percent. AK Steel Holding Corp jumped 5.4 percent to $21.27 after the company posted a fourth-quarter profit and forecast higher prices as demand shows signs of growth.

(Editing by Kenneth Barry)