Barry McCarty, defending his District Amateur golf championship, survived a 22-hole match yesterday to move into today's quarterfinals of match play at Washingtonian's National course in Gaithersburg.

McCarty next meets Dave King, 1971 winner of the Maryland Amateur. King, who plays out of Bethesda, defeated Mark Hartman, 3 and 2, in the second round.

McCarty of Belle Haven beat Tom Raphael of Montgomery Country Club on the fourth extra hole by two-putting from 20 feet for par 5. McCarty, 2 up after 11 holes, lost the 12th and 13th to par and the next eight holes were halved.

Another second-round match went to sudden death before Harry Cain defeated Jeff Cherner with a birdie on the 19th hole.

Cain plays Washingtonian's Webb Heintzelman, the No. 3 seed, in the quarterfinals. Heintzelman, 19, a sophomore-to-be at the University of South Carolina, was a 3-and-3 winner yesterday over Mark Spolarich of Crofton.

Wayne DeFrancesco of Cedar Crest, the 1978 winner, advanced by defeating Glen Carpousis of Army Navy, 2 and 1. DeFrancesco won the medal position Thursday by shooting par 70 on Washingtonian's 6,765-yard course.

DeFrancesco, 23, a Louisiana State University graduate, plays Gary Marlowe of Woodmont in the quarterfinals. Marlowe beat Vern Caswell of Brooke Manor, 3 and 2.

A surprise quarterfinalist is Bethesda's Ed Ofterdinger, who defeated eighth-seeded Randy Morris of the host club, 2 and 1. Ofterdinger had survived a six-man playoff for the No. 32 position in Thursday's qualifying rounds. Today, he plays Rodney Stanley, a 3-and-2 winner over Greg Bremer.