BEIJING - U.S. President Barack Obama told Chinese students on Monday he did not fear their nation's rise, ahead of talks on trade imbalances and currency strains that underline the sometimes tense embrace between the two giants.

Testy exchanges between the world's biggest and third biggest economies have continued even after Obama began his first visit to China on Sunday. A Chinese government spokesman rebuffed calls for the yuan currency to appreciate, a step Obama has urged to correct imbalances in the global economy.

But the U.S. president held to a reassuring, sometimes folksy tone at a forum of students in Shanghai, with the mostly gentle questions providing little scope for political hardball.

We do not seek to contain China's rise, he said before taking questions from the audience of several hundred students and also from the Internet.

On the contrary, we welcome China as a strong and prosperous and successful member of the community of nations.

Obama also used the forum to champion Internet freedom and human rights on the first full day of his trip. But he did not mention Tibet or other sensitive issues that could have drawn ire ahead of his talks with Chinese leaders in Beijing, where he arrived later on Monday.

These freedoms of expression and worship, of access to information and political participation, we believe are universal rights, they should be available to all people including ethnic and religious minorities, Obama told the audience in Shanghai.

I'm a big supporter of not restricting Internet use, he said. The more open we are, the more we can communicate and it also draws the world together.

While billed as an opportunity for Obama to reach out to the Chinese public, the meeting bore the markings of a scripted but friendly encounter. Students dressed in suits smiled and applauded politely, and laughed when Obama tried Chinese.

U.S. Commerce Secretary Gary Locke was not so reticent about Washington's frustrations with Beijing's currency settings.

I think it's quite clear all around the world as to the views of what China should do with its currency, Locke told Reuters in an interview. The United States has been pleased with some of the progress made over time, but more needs to be done.

Chinese Commerce Ministry spokesman Yao Jian was equally blunt in rejecting calls to raise the value of the yuan, which would make the country's exports relatively more expensive.

Either from the perspective of promoting stable global economic development, or from the perspective of promoting a recovery in Chinese exports, we must provide a stable and predictable environment for our enterprises, including macro-economic policy and currency policy, said Yao.

China has had a huge trade surplus with the United States, and is also the largest foreign holder of U.S. government bonds.

The U.S. trade deficit with China widened 9.2 percent in September to $22.1 billion, the highest since November 2008, according to U.S. data released last week.

DIFFICULT DISCUSSIONS AHEAD
Obama's day in Shanghai was a warm-up for his summit with President Hu Jintao in the capital on Tuesday, when the contention over trade, currency and economic policies will jostle for attention along with North Korea, Iran and climate change.

Officials from both sides have said they want to foster broader goodwill in that summit, and it was unclear whether the quarrel over the yuan would spill over into the cavernous Great Hall of the People where the two presidents sit down on Tuesday.

Obama has said he will also raise the sensitive subjects of human rights, as well as the future of the yuan.

At a gathering of Asia-Pacific leaders in Singapore over the weekend, Hu pointedly ignored international calls for his government to raise the value of the yuan.

He and other senior Chinese officials have instead accused other countries -- implicitly including the United States -- of damaging trade protectionism aimed at Chinese goods.

A senior Chinese official on Monday made a fresh, thinly veiled criticism of Washington for running lax monetary and fiscal policies that risk undermining the dollar.

In their talks, the two presidents will have to cover many dimensions of a deep and complex relationship, among them trouble-spots such as North Korea and Iran, energy security, and negotiations for a new international climate change pact.

Obama said both the United States and China -- which together account for at least 40 percent of global greenhouse emissions -- must take critical steps to tackle global climate change.

Other countries would be watching them in the run-up to next month's U.N. meeting in Copenhagen, he said.

Beijing has said developing countries should not accept internationally binding ceilings on emissions while they focus on economic growth and escaping poverty.

Neither markets nor officials appear to expect any rapid shift in China's settings for the yuan in the wake of the summit. Obama also faces a tough sell with the often ardently patriotic Chinese public.

The purpose of Obama's visit to China is to get China to help the U.S. economy's health. It's like a fox in a chicken coop, said one Chinese Internet user, responding to the U.S. president's comments at the student forum in Shanghai.

(Additional reporting by Caren Bohan and Melanie Lee in Shanghai, Langi Jiang in Beijing; Writing by Chris Buckley; Editing by Ken Wills and Dean Yates)