President Carter warmly welcomed President Tito of Yugoslavia here yesterday and strongly underscored American interest in the continued independence of his country.

Tito arrived Monday to begin talks with the Carter administration on a wide range of issues: the resumption of American arms sales to Yugoslavia, East-West detente, a possible mediating role in the Horn of Africa and the Middle East.

Carter lavished praise on Tito, the last of the major World War II leaders, calling him the symbol of East European aspiration for freedom and independence and "true friend" of the United States.

But in a remark apparently addressed to the Soviet Union, Carter warned against any outside interference in Yugoslav affairs after Tito leaves the political scene. The Yugoslav marshal will be 86 in May.

"The independence and the territorial integrity of Yugoslavia," Carter said in a welcoming speech, "is one of the basic foundations of world peace now and in the future."

As part of an effort to bolster Tito's government, the administration is now preparing to sell U.S. arms to the independence communist nation.

The Yugoslavs have presented a shopping list that includes some of the latest U.S. weapons systems. According to Pentagon sources, the Yugoslavs are trying to obtain, among other things, Harpoon antierick, guided by a TV homing device, the antitank wire-guided missile Dragon and as integrated naval defense system that includes surface-to-air missiles, radars and guns.

The Yugoslav request, however, has created tensions between the administration and the militry: Apparently reflecting this was the sudden firing of Col. Robert E. Bartos, U.S. Army attache in Belgrade.

Bartos, who served as an Army attache in the U.S. embassy in Moscow in the late 1960s and subsequently commanded a battalion in Vietnam, was appointed to the Belgrade post four months ago. Before his last assignment he represented the defense secretary's office at th U.S. Soviet strategic arms limitation talks (SALT) in Geneva.

According to the sources, Bartos' reports from Belgrade stood in sharp disagreement with those of other U.S. officials on the question of Soviet influence in Yugoslavia's armed forces. A Pentagon spokesman here declined comment, and said he believed Bartos was still in Belgrade.

Lawrence Eagleberger, the U.S. ambassador to Yugoslavia, said last night that the reason for Bartos' removal was "basically a personality problem within the embassy. I don't fire people for policy differences."

U.S. officials said yesterday that the administration has already agreed in principle to sell the Yugoslavs several of the items on their shopping list. They said that it was highly unlikely that the sales would include the Harpoon and Maverick missile systems.

But the administration has yet to overcome deep suspicions within the Pentagon on transfer of high technology to a communist country, albeit a nonaligned one such as Yugoslavia.

The question of arms sales was expected to come up during the talks between Carter and Tito at their meeting tomorrow. Defense Secretary Harold Brown is scheduled to attend those talks. It will be also discussed today by Secretary of State Cyrus R. Vance and Yugoslav Foreign Misister Milos Minic.

Since Tito's break with the Soviet Union in 1948, the United States has provided about $750 million in arms aid to Yugoslavia. The military assistance program was terminated in 1960 at Yugoslavia's request. Subsequently, U.S. arms sales to Yugoslavia involved only spare parts, amounting to about $1 million annually.

Tito was the first Communist leader to visit the Carter White House, and was met by a full honor guard ceremony on the south lawn. A small group of Yugoslav exiles marched outside the White House protesting the visit.

Tito, 85, vigorous and somber as Carter described him as a contemporary and "a friend and associate" of Winston Churchill, Franklin D. Roosevelt and Charles De Gaulle. Carter also extended unusually high praise for Tito's role as a leader of the Third World.

In contrast to Carter's effusiveness. Tito read a brief statement in which he expressed desire to improve U.S. Yugoslav relations. The two men subsequently adjourned to the Oval Office for a private conference, Tito smoking a long Cuban cigar.

After their 90-minute discussion, White House spokesman Jerrold Schecter reaffirmed U.S. support of Yugoslovia's independence.

"We have a commitment to support Yugoslavia's independence and integrity," Schecter told newsmen.

Just how broad the U.S. commitment is remained a question. While campaigning for the presidency, Carter said he would favor the use of U.S. troops to assist Yugoslavia in the event of a Soviet attack. Since then, however, the administration has taken a number of steps to strengthen the Yugoslav regime.

During the past several months Tito has visited a number of world capitals, including Moscow and Peking. He was believed to have briefed Carter on his impressions gained in talks with Soviet and Chinese leaders.

During his three-day visit, Tito is scheduled to meet with congressional and business leaders. On his way home, he is to stop in London for an official visit to Britain.