U.S. military and other helicopters yanked stranded North Carolina residents yesterday off roofs and treetops, where they fled the worst flooding in state history as the cost of Hurricane Floyd's tear up the Eastern Seaboard became clearer: at least 40 people dead and hundreds of millions of dollars in property and agricultural damage.

A near constant buzz of dozens of helicopters filled the air in eastern North Carolina, with so many undertaking rescue efforts that communications planes had to be sent up to serve as airborne air traffic controllers and prevent collisions.

Nearly 50 helicopters from U.S. military branches, the Coast Guard and other agencies were in the air for rescue missions yesterday in Edgecombe, Nash, Pitt and Duplin counties. In Edgecombe County, 3,500 people had been rescued in the last 48 hours by helicopter and boat, according to county emergency management officials. Some helicopters carried supplies, including electrical generators.

President Clinton declared a major disaster in Virginia and an emergency in New York state, freeing up federal funds to help victims. Clinton, who already had declared hardest-hit North Carolina a disaster area and nine New Jersey counties a federal emergency, announced he would visit North Carolina tomorrow.

"This is one of the biggest multi-state disasters in U.S. history," Lacy Suiter, of the Federal Emergency Management Agency, said of Floyd, which prompted the country's largest evacuation.

At least 44 deaths were attributed to the storm, which has now dissipated, including 20 in North Carolina; eight in Pennsylvania; four in New Jersey; and three in Virginia.

Power companies scrambled yesterday to restore power to hundreds of thousands of customers from North Carolina to Vermont. In North Carolina, more than 242,000 were without power, state officials said; 14,300 utility workers were on the job, some from as far as Detroit and New York City. In New Jersey, the figure was 74,000. Virginia Power reported 12,000 without power, including 29 in Northern Virginia. In Maryland, more than 130,000 residents were without power: the largest number was in Baltimore City, 38,000. In Anne Arundel County, 27,000 lacked electricity. In the Washington area, Potomac Electric Power Co. said 1,200 remained in the dark: Montgomery County, 100; Prince George's County, 700; and the District 400. Pepco said it expected all would have service by today.

In terms of sheer havoc and property damage, North Carolina was hit hardest.

"Eastern North Carolina has suffered devastation like we've never seen before," an emotional Gov. James B. Hunt Jr. (D) said after touring the area.

Damage to crops and livestock probably will surpass the $344 million in losses suffered when Hurricane Fran hit the state in 1996, agricultural officials said. One farm alone lost 4,500 hogs, according to Sara Kempin, spokeswoman for the state emergency response team. A state official said he saw drowned birds streaming from inundated poultry houses. Authorities said the state's hundreds of thousands of drowned animal carcasses could create health problems. The Carolinas Cotton Growers Association estimated $75 million in cotton losses. Tobacco industry officials said $80 million of this year's $800 million crop could be lost.

Residents throughout eastern North Carolina, particularly Duplin County, were forced to higher ground as rivers continued to rise yesterday, bloated by water from tributaries. The National Weather Service said several rivers, including the Tar, Neuse, Cape Fear and Roanoke, were expected to crest near record levels in the next several days and inundate entire towns.

State emergency response team spokesman Robert Carver, who had just returned from a helicopter inspection trip said last night that almost the entire town of Princeville, on the Tar River was under water. All he could spot in the town, he said, was "rooftops, here and there."

"We're hitting a peak now. The Tar River is expanding and water is spreading, so we're getting more people," Keith Larson, a Red Cross volunteer coordinating a shelter at E.D. Aycock Middle School in Greenville, said. "Right now, the biggest problem is not having electricity. We've lost refrigeration, and our food is getting bad."

As the flooding got worse, another problem developed: contaminated drinking water. At least one waste lagoon on a North Carolina hog farm had ruptured, spilling 2 million gallons of sewage into a tributary of the Northeast Cape Fear River.

The water supplies of Pitt and Edgecombe counties were contaminated, said Renee Hoffman, a state public safety spokeswoman. Worse, waste-water treatment plants in Edgecombe County overflowed, rendering them inoperable. Five local dams were overtopped.

The Federal Emergency Management Agency was to begin yesterday bringing in 300,000 gallons of water and 300,000 pounds of ice daily for the next five days.

Meanwhile, more than 400 roads in eastern North Carolina were closed, including about 60 miles of Interstate 95, the state's main north-south artery. I-95 remained closed in the Roanoke Rapids area close to the Virginia border. The flow of water over many of the roads remained "extremely swift" last night, a state emergency response spokesman said.

Areas of Virginia, too, were coping with flooding, prompting Clinton to make federal disaster funds available for the cities of Franklin, Hampton, Portsmouth, Newport News, Norfolk and Virginia Beach, and the counties of James City, Isle of Wight and Southampton. Virginia officials report about $131 million in damage.

Aid could include disaster housing, grants, low-cost loans to cover uninsured property losses and other assistance. Disaster declarations trigger more immediate and broader kinds of federal aid than the kind of emergency declarations Clinton made in New Jersey and New York.

In Franklin, Va., a city of about 8,200 people 45 miles southwest of Norfolk, the small Blackwater River had not flooded since 1940 until last week, when it left all 181 downtown businesses under nine to 12 feet of water. Scores of people were driven into shelters.

Gov. James S. Gilmore III (R) took a helicopter tour of Franklin and other damaged southeastern Virginia areas. He visited Portsmouth, where water service was restored yesterday for 119,000 people, and nearby Chesapeake and Suffolk, though residents were told to use water only for flushing toilets.

Water also was a problem in New Jersey, where as many as 1 million people in five counties were told to boil their water at least through today after the main treatment plant was flooded.

The Maryland Emergency Management Agency said preliminary damage assessments were $7.9 million, with Harford County sustaining the most. Agency spokesman Quentin Banks said the figures had to be verified this week before officials ask for federal emergency assistance.

Compared to other areas, the branch-strewn streets and basement flooding in the Washington area seemed minor. Pepco urged customers still without power to call 202-833-7500. It said restoring the last few hundred customers was proving particularly arduous, requiring time-consuming repair of broken poles or cross-arms.

Leslie Salaman did call to report that a massive oak tree had crashed onto her Northwest Washington home, leaving her street without power. A tree service said it can't remove it until Pepco removes the severed lines. "We call and they tell us they have dispatched a truck and then, of course, there is no truck," neighbor Meredith Jordan said.

Mishra reported from North Carolina; Strauss from Washington. Staff writers Joan Biskupic, Martin Weil and the Associated Press contributed to this report.

CAPTION: A resident of Goldsboro, N.C., wades through rising floodwaters to get back to his house.

CAPTION: Sherry Williams and Henry Warrington clean up after flooding in Rocky Mount, N.C.

CAPTION: An abandoned car sits submerged on the outskirts of Rocky Mount, N.C.