U.S. machinery maker Caterpillar Inc posted stronger-than-expected quarterly earnings on Tuesday, and raised its full-year outlook, citing signs of stabilization in the world's credit markets and economies.

The company, the world's largest maker of mining and construction vehicles, reported a second-quarter net profit of $371 million, or 60 cents a share, compared with $1.11 billion, or $1.74 a share, last year.

Sales and revenue fell 41 percent to $7.98 billion.

Stripping out costs associated with layoffs and restructuring, Caterpillar made 72 cents a share.

Analysts, on average, had expected the Peoria, Illinois-based company to report a profit of 22 cents a share on sales of $8.36 billion, according to Reuters Estimates.

The better-than-expected results sent Caterpillar's shares up $3 to $39.65 in premarket trading.

(Reporting by James Kelleher; Editing by Derek Caney)