"This country is going to get a hard look" by the Reagan administration as it reexamines U.S. policy in Africa, an American economist said at a recent seminar here.

For Tanzania, which receives more international aid annually than any other African country, the examination may well be crucial. For the world's poorest nations -- most of which are in Africa -- the result is likely to be taken as an indicator of President Reagan's attitude toward the Third World.

By any standard of measurement, the economy of this East African nation is in a mess.

The country, more than twice the size of California, is operating "on a day-to-day basis," a Western diplomat said. Foreign exchange reserves are sufficient for only one month's imports.

The possibility of mass starvation among its 18 million people increases daily as a severe drought continues into its second year. Unless the rains start soon, "we will face a serious famine situation," President Julius Nyerere said recently.

Last year the country had to spend precious foreign exchange to import more than 200,000 tons of corn, the staple of the Tanzanian diet. It will have to import about the same amount this year while finding itself in a weaker financial position.

Shortages are commonplace. Long lines form in stores to obtain meager supplies of soap, cooking oil, margarine and milk.

Even though Nyerere retains a high level of popularity among his people, there is increasing grumbling against his socialist policies, which in some quarters are blamed for many of the country's ills.

"Our president is good in politics, but not economics," said a former municipal accounts clerk who now drives a taxi seven days a week. He has increased his income by 250 percent but there is little to buy with the money.

African socialist countries are unlikely to be high on the list of candidates for aid from the Reagan administration, which plans to target aid to countries following a pro-American policy.

Nyerere is Africa's most prominent proponent of nonalignment. He has already criticized the United States for its military buildup in the Indian Ocean and is bound to escalate the criticism if the Reagan administration continues to soften U.S. opposition to white-ruled South Africa.

The Reagan administration already trimmed former president Carter's proposals in his outgoing budget from $24.2 million to $15.9 million. A full assessment of administration aid policy toward Tanzania may not be possible until next year when Reagan officials have their first chance to develop a budget from scratch.

U.S. proposals to slow down $3 billion in grants to the World Bank's soft loan program could also seriously affect Tanzania, which last year received $125 million from that source.

Tanzania -- with a per capita income of $230 a year -- received more than $600 million in bilateral and multilateral aid last year. Sweden was the largest individual donor at $90 million with Japan second with almost $70 million. Foreign aid provides more than two-thirds of Tanzania's development budget.

Despite Tanzania's economic woes, the government has registered impressive achievements in improving social conditions in the 20 years since gaining independence from Britain. Many of the improvements are the kind U.S. assistance has sought to foster in the hope that such progress helps to keep countries in the Western camp.

Tanzania's educational progress has been remarkable. Adult literacy shot up from 10 percent in 1960 to 73 percent in 1978, one of the highest rates of increase in the Third World. Neighboring capitalist-oriented Kenya, often citied as one of Africa's few success stories, went from 20 to 40 percent literacy over the same period.

Primary school enrollment has increased from 25 percent of the school-age population in 1960 to a current figure of 95 percent.

Similar advances have been made in the field of health with life expectancy increasing by a decade to 51 years. Forty percent of villages now have clean tap water and 35 percent have clinics -- both rarities at independence.

On the other side of the ledger, however, the country has been running an annual balance of trade deficit of more than $600 million annually for the last three years, causing a $300 million backlog in Tanzania's payments to creditors.

After months of tough bargaining, Tanzania negotiated a $235 million balance of payments support loan last September from the International Monetary Fund, but the IMF has already complained that the government has not kept a tight enough rein on spending and credit.

In 20 years of independence "one thing we have not done very well," Nyerere told reporters recently, "is to change our agriculture." After increasing in the first decade of independence, Tanzania's exports, mainly agricultureral products such as coffee, tea and sisal, have fallen back to the level of 1962. Last year's exports were little more than half the 1972 totals.

Many blame the country's burgeoning socialist-oriented bureaucracy.

Finance Minister Amir Jamal cites three basic factors for the difficulties: the costly war in Uganda to overthrow dictator Idi Amin in 1979-80, the huge increase in oil prices and the devastating drought.

The war, which at one point involved 40,000 Tanzanian troops, is estimated to have cost Tanzania $500 million. "Any economy can be stretched," Jamal said, but with the oil and drought problems, "what are you going to lean on?"

In 1970, he said, a ton of exported tea brought 60 barrels of oil. Today, it buys 4.5 barrels.

Critics note, however, that despite all the excuses offered by officials, government inefficiency and, lately, corruption have also played major roles in the economic woes.

A two-month-old investigation of corruption has so far led to the firing of five senior officials, including the minister of transport and the head of the country's airline, although no criminal charges have been brought.

The number of government boards which market the country's products have doubled in the last three years to about 300 with a consequent escalation of administration costs which now consume 16 percent of the overall budget.

The investigation revealed that administrative costs last year for the Pyrethrum Board, which controls production and marketing of the flower byproducts used in insecticides, were higher than the total value of the crop. Nyerere suspended the board.

Because of the problems with the boards, the government is considering returning the marketing function to cooperatives, which were abolished several years ago.

Asked why the cooperatives were abolished, a government official said with an ironic smile, "Because they were becoming too bureaucratic, inefficient and top-heavy."

Nyerere, however, holds firmly to his socialist principles. "The private sector is a source of corruption," he told reporters. "If we allow a few individuals to accumulate money they will use the money to tempt others. So basically we must abolish this."

A Western diplomat said it was too simplistic to blame all of the country's problems on its socialist doctrines. He added, however, "Tanzania is more socialist than it can afford to be."