Consumer prices rose at their slowest rate of the year last month, climbing a scant 0.2 percent as food and clothing prices fell and energy prices moderated, the Labor Department reported yesterday.

Separately, the Commerce Department said the economy grew more slowly in the second quarter of the year than preliminary figures had indicated. Inflation-adjusted gross national product went up at an annual rate of 2.3 percent, instead of the 2.6 percent estimated previously.

A larger-than-expected trade deficit in June was blamed for the downward revision, which was not seen as a sign of a significant slowdown in economic growth.

Economists said July's low inflation supported their belief that the price surges caused earlier this year by the rise in oil prices have slowed, and that inflation will remain at moderate rates for the rest of 1987.

"You go back three or four months ago and a lot of people in the financial markets seemed to be concerned about a major acceleration of inflation and the possibility of a wage-price spiral," said Lawrence Chimerine, chairman and chief economist for Wharton Economics.

"Inflation this year will be higher than it was for the last couple of years, but we are not moving to a period where we are going to see a constant acceleration of inflation. I don't think the economy is growing fast enough to support that."

During the first seven months of 1987, the consumer price index rose 5.0 percent at an annual rate. Prices increased at a rate of 6.2 percent during the first three months of the year, when oil prices and apparel costs were rising rapidly, and the increase has been gradually slowing since then. Consumer prices, adjusted for seasonal factors, rose 0.4 percent in June.

The lower rate of inflation also was seen as an indication that the falling U.S. dollar had not caused rampant price increases, either in imported goods or in U.S. goods competing with imports. A weaker dollar means goods priced in foreign currencies become more expensive, and domestic manufacturers sometimes can raise their prices without losing market share.

"Apparel prices have been falling for two months," said Washington forecaster Joel Popkin. "There appears to have been little impact from the dollar's depreciation."

The slower GNP growth rate came about almost entirely because the U.S. merchandise trade deficit, which hit $15.7 billion in June, was larger than Commerce economists had anticipated in preparing the preliminary second-quarter figures. Real net exports rose by only $1.9 billion instead of the $7.4 billion increase estimated earlier.

As they have for several months now, economists predicted that the trade situation would improve in coming months and that the economy would continue to grow at a moderate pace. The GNP rose by 3.4 percent during the first half of 1987, a rate consistent with most public and private forecasts.

"People should not regard the downward revision as a warning sign that the economy is falling apart. It is not," said Donald Straszheim, chief economist of Merrill Lynch Economics.

The low inflation rate for July was spearheaded by a 0.2 percent decline in food prices, which had risen 0.7 percent in June, and a 0.6 percent drop in apparel prices, which had declined by 0.8 percent the month before. Energy prices, which went up 1.5 percent in June, rose only 0.1 percent in July.

Popkin said next year could see a faster rate of inflation, as workers demand higher salary increases to keep up their standard of living.

"We've had a decline in real wages, a tightening of the labor market and the potential for a rise in the minimum wage," which Congress is debating, Popkin said. "Any two of those three should be enough to start wages increasing at a faster rate than they have been for the last several years."

Commerce also reported yesterday that after-tax corporate profits rose 4.2 percent in the second quarter of 1987. It was a significant reversal from the first quarter, when profits fell by 3.7 percent. And the Bureau of Labor Statistics said real weekly earnings -- earnings after inflation -- fell 0.3 percent in July. Hourly earnings went up 0.2 percent, but people worked 0.3 percent fewer hours and prices rose 0.2 percent