The cost of living continued to rise in June, the Labor Department reported yesterday. The 0.6 increase was somewhat steeper than some economists had anticipated.

On the brighter side, the economy generally turned in its second consecutive strong, job-creating quarter in the three months that ended June 30.

The Commerce Department said that real gross national product, the value of goods and services produced by Americans, rose at an annual rate of 6.4 per cent in the second quarter after rising at a 7.5 per cent rate in the first three months of the year.

The economy must grow at an annual rate of about 4 per cent just to create enough jobs to satisfy the expanding population and must grow faster than that to reduce unemployment. Because of the big growth in the economy in the first six months of the year, the unemployment rate fell from 8 per cent last November to 7.1 per cent in June.

The Labor Department said that another big increase in food prices spurred the 0.6 per cent rise in the cost of living in June.

Because of a sharp decline in farm prices in May and early June. Drede had been some expectation that supermarket prices would shlow their rate of increase last month. But grocery prices rose 0.7 per cent in both May and June.

However, administration economists and most other private forecasters think that inflation will slow down the rest of the year and the buoyant growth of the first half of the year will also tapper off.

As a result, administration economists say there will not be as much improvement in unemployment during the next six months as there was in the first half of the year. Other analysts, such as Alice Rivlin, director of the Congressiional Budget Office, have said there will be no more improvement in the unemployment picture this year.

According to a spokesman for the President's Concil of Economic Advisers, the 0.6 per cent rise in the consumer price index - it has been rising at an 8.1 per cent annual rate over the last three months - was about whatthe administration had expected.

While food prices were a little higher than expected, the recent declines in farm prices means that grocery costs should "moderate a bit" in coming months, he said.

Food prices climbed 0.7 per cent at the supermarket and 0.8 per cent overall when restaurants are included. Non-food commodities such as fuels, clothing and cars rose only 0.2 per cent in March, April and May and 0.7 per cent in January and February.

Service prices rose 0.8 per cent about the same high rate at which they have been rising all year.Medical care prices rose 0.6 per cent, their smallest rise this year: other services such as gas and electricity, rose sharply.

The Labor Department noted that gasoline prices fell in June, although fuel oil and coal prices rose.

The consumer price index is based on a survey of 400 items. The index itself is not seasonally adjusted, although all percentage changes are fixed to take account of normal seasonal ups and downs.

The index stood at 181.8 per cent of its 1967 average in June, meaning that a selection of goods and services that cost $100 in 1967 cost $181.80 last month.