Japan's top consumer electronic firms recovered faster than expected from the March earthquake, keeping their full-year profit forecasts despite a weakening TV market and worries about the outlook for the global economy.

Video game maker Nintendo Co was a standout disappointment, unexpectedly slumping to its first quarterly operating loss on record, hit by slow sales of its 3DS handheld game player and a strong yen. It now forecasts its lowest annual profit in 27 years.

Sony Corp and Panasonic Corp warned of weak TV sales, especially in the United States and Europe, following Philips and Corning Inc in highlighting sluggish demand.

Global consumer confidence fell in the second quarter to its lowest level in 18 months as an uncertain economic outlook, a deepening euro zone debt crisis and rising inflation made people cautious, a Nielsen survey showed.

Sony, Panasonic and many other Japanese tech firms are still hoping they can swing to profits in the rest of the calendar year, Said Derek Lin, manager of the Asia-Pacific Fund of Uni-President Asset Management in Taipei.

The worst of their stock price declines is over, but how far they can come back up depends on demand from U.S. and European markets.

Over the past several years, Japanese companies have lost market share in televisions, flat screens and chips to aggressive South Korean rivals such as Samsung Electronics and LG Display.

Panasonic took another step in a plan to escape such competition by switching emphasis to environmental technology, announcing Thursday it would hive off the white goods units of subsidiary Sanyo to China's Haier Group.

Shares in many Japanese technology companies have been pummeled since the quake, with Sony down almost 30 percent since March 10, partly on concerns about a series of network security breaches that cast a shadow over its online businesses. The broader Nikkei average is down about 5 percent in the same period.

The giant Japanese technology conglomerates mostly stuck to their profit forecasts for the year to March 2012, underscoring a rapid comeback from the disaster-related production difficulties in Japan.

However, doubts about the prospects for the rest of the year are creeping in, due partly to the yen's renewed rise against the dollar and the euro, which has been fueled by jitters about government debt.

TOUGH STRUGGLE FOR SONY

Sony, the maker of Bravia TVs and PlayStation game consoles slashed its annual forecast for LCD TVs to 22 million sets from 27 million and warned annual losses in the division might widen on the previous year. Only a better-than-anticipated performance by other units kept the company from cutting its profit outlook.

While the business is deteriorating, we are not seeing any countermeasures and the earnings outlook remains opaque, Citi analyst Kota Ezawa said in a note after the results.

Sony, once a symbol of Japan's high-tech might, is struggling to come up with hit devices and finds itself outmaneuvered in TVs by Samsung and in the booming tablet market by Apple Inc.

The company's quarterly operating profit fell 59 percent to 27.5 billion, almost double what analysts polled by Thomson Reuters I/B/E/S forecast.

At a news conference in Tokyo, Panasonic's chief financial officer, Makoto Uenoyama, said the company may not stick to its annual flat-panel TV sales forecast of 25 million units, instead focusing on improving profitability at the loss making division.

The first quarter post-quake slump at Panasonic Corp and Sharp Corp was precipitous, but they too beat analysts' consensus estimates and also stuck with estimates made in the wake of a disaster that closed their factories as parts ran out.

Panasonic's April-June profit fell to 5.6 billion yen from 83.8 billion yen, versus market expectations for a 20 billion yen loss.

Sharp's operating profit was a meager 3.5 billion yen, but that was versus market expectations of a loss of 8.2 billion yen.

Sony left its full-year operating profit outlook unchanged at 200 billion yen, flat on the previous year. Panasonic stuck with 270 billion yen and Sharp kept its 97 billion yen target unchanged.

Toshiba Corp, the world's No.2 maker of flash memory chips, said quarterly operating profit fell 88 percent as the earthquake hit its power operations and a strong yen bit into earnings, and it kept its annual forecast in line with expectations.

(Additional reporting by Faith Hung in TAIPEI, Saeed Azhar in SINGAPORE and Yuko Takeo in TOKYO; Writing by Anshuman Daga; Editing by Lincoln Feast)