U.S. stocks rose on Tuesday, with major indexes turning positive for the year, as Greece appeared to be taking steps toward a resolution on aid from the European Union.

EU officials urged Greece on Monday to agree to additional deficit-reduction measures within days to tackle a fiscal crisis that has shaken the euro zone and promised to help Athens overcome its debt problems.

The market believes that Greece is going to be resolved, that is what the market is betting on here, said Paul Mendelsohn, chief investment strategist at Windham Financial Services in Charlotte, Vermont. You are not going to get the worst case scenario. This is probably going to be kicked down the road into the future.

Tuesday's advance pushed the Dow index into positive territory for 2010, a day after both the S&P 500 and Nasdaq moved above the break-even mark for the year.

The Dow Jones industrial average <.DJI> gained 36.42 points, or 0.35 percent, to 10,440.21. The Standard & Poor's 500 Index <.SPX> rose 5.17 points, or 0.46 percent, to 1,120.88. The Nasdaq Composite Index <.IXIC> added 11.07 points, or 0.49 percent, to 2,284.64.

The pace of merger activity increased, after CF Industries Holdings Inc upped its hostile bid for Terra Industries Inc to $47.40 per share in cash and stock. Terra shares surged 13 percent to $46.55 while CF shares shed 4.5 percent to $100.02.

We are seeing M&A across multiple sectors. The takeover activity is putting a floor under this market, said Mendelsohn.

Later in the session, U.S. automakers release February sales. Economists in a Reuters survey expect domestic median annualized sales of 3.7 million cars and 4.2 million trucks. In January, the figures were 3.8 million cars and 4.18 million trucks.

Chipmaker technology bellwether Qualcomm Inc , rose 4.4 percent to $37.14 after the company announced a new $3 billion share buyback plan and raised its quarterly dividend by 12 percent.

UBS raised its 2010 estimate for global semiconductor company revenue growth, saying the first quarter appeared to be tracking ahead of seasonal trends with strong personal computer sales that should continue to support demand for DRAM microchips.

The PHLX Semiconductor index <.SOXX> rose 0.5 percent.

(Editing by Padraic Cassidy)