General Motors Corp., riding the crest of strong demand for new cars and trucks, yesterday reported a record $1.1 billion second-quarter profit - the first time the world's largest auto company topped the billion-dollar mark in any three-month period.

GM's earnings of $3.82 a share were 20.7 per cent higher than last year's $909 million ($3.16 a share), the previous April-June high. Sales of $14.9 billion, up 18.8 per cent from $12.5 billion, also were a record for any quarter in the firm's history.

Despite the record sales and profits, top GM executives noted the firm's profit margin remained well below record levels - slightly more than 7 cents on each sales dollar. That compares with 8.3 per cent in 1973's second quarter and the 11 per cent profit margin in 1965.

The lower profit margin "again reflects the continuing impact on earnings caused by increased labor and material costs which, for competitive reasons, cannot be fully recovered through price hikes," GM chairman Thomas A. Murphy and president E.M. Estes said in the financial statement.

They also predicted 1977 car and truck sales would top the record 14.6 million vehicles - including imports - sold in 1973 and warned against any delay in working out new clean-air standards by Aug. 8.

"Should Congress not act by then, plant closings would have to be scheduled immediately," they said. "Component plants would be affected first, and all automobile production and assembly for the U.S. market would be scheduled to be terminated by mid-September."

GM's financial statement was the second from the U.S. auto industry for the April-June quarter, which is expected to be the best ever by the time Ford Motor Co. and Chrysler Corp. report their results by the end of the week. American Motors Corp. last week reported a slim $1.6 million profit.

Ford is expected to report a record profit that analysts say may be as much as $556 million, while Chrysler earnings of about $90 million will be below last year because of a six-week strike at a key truck assembly plant.

Among U.S. corporations, GM's billion-dollar effort still trailed American Telephone & Telegraph Co., which reported a record $1.159 billion profit for the three months ended May 31, the latest in a string of four billion-dollar quarters.

But GM, which ranks second behind Exxon among U.S. corporations, out-performed the oil giant in the most recent quarter. Exxon reported last week that its April-June earnings of $575 million were down 3 per cent from last year, while its best quarter ever was the $862 million profit in the fourth quarter of 1974.

The upward trend of oil company earnings continued yesterday with several major oil producers announcing increased profits for the second quarter.

Industry analysts said the trend reflected increased demand for gasoline and other fuels, and generally higher prices. Virtually every oil company except Exxon Corp. has reported higher second-quarter earnings.

Exxon, the largest industrial firm in the U.S., blamed foreign currency losses for the 3.4 per cent drop in quarterly profits it announced last Friday. Yesterday, the firm declared a quarterly cash dividend of 75 cents a share.

Mobil Corp., the nation's third-largest oil firm, reported estimated quarterly net earnings of $244 million ($2.30 a share) compared with $214 million ($2.10) during the same period of last year. The company didn't disclose revenue figures for the second quarter.

Standard Oil Co. of California, the country's fourth-largest oil company, also reported significantly higher profits. Net earnings for the second quarter were $277 million ($1.62 a share) compared with $206 million ($1.21) last year. Revenue was $5.56 billion against $4.77 billion in 1976.

Among other oil companies releasing quarterly reports:

Tenneco, Inc., No. 10, announced slightly improved earnings, with net income increasing to $106.5 million ($1.10 a share) for the second quarter from $105.5 million ($1.14) in 1976. More shares were outstanding in 1977. Revenue was $1.9 billion, against $1.6 billion.

Sun Oil Co., No. 13, reported second-quarter net earnings of $92.7 million ($1.95 a share) compared with $90.6 million ($1.86). Revenue was $1.5 billion against $1.3 billion.

Cities Service Co., No. 16, reported net second-quarter income of $56.4 million ($2.05 a share) compared with $51.5 million ($1.89). Revenue was $1.08 billion against $911.2 million.

Murphy Oil Corp., a relatively small firm based in El Dorado, Ark., showed slightly reduced earnings. Net for the second quarter was $12.8 million ($1.04 a share) compared with $13.2 million ($1.06).

General Foods Corp., the nation's largest coffee roaster, yesterday said "a marked decline in the company's coffee volumes" drove profits down by 3.8 per cent in the second quarter. Earlier this month, the company had predicted consumer resistance to high coffee volumes" drove profits down net earnings.

In the quarter ended July 2, General Goods earned $50.7 million ($1.02 a share) against $52.8 million ($1.06) a year ago. Revenues rose from $1.15 billion to $1.3 billion.

Coffee prices have been declining at wholesale and retail levels lately because consumption is down - by some estimates as much as 20 per cent - from a year ago. But coffee still retails for more than $3 a pound.

The American Broadcasting Cos., Inc., which jumped into the top spot among the three television networks last season, yesterday reported a 61 per cent gain in second-quarter profits.

ABC said it earned $33.3 million ($1.86 a share) in the quarter compared from the $20.7 million ($1.18) a year ago. Revenues rose 21 per cent to $382 million from $315.9 million.

ABC said its television network had a 30 per cent gain in revenues for the quarter and a substantial gain in earnings.