A Frederick County high school principal, demoted to a teaching position after conflict-of-interest allegations, has been reassigned as the vice principal of a middle school in another part of the county, as the result of an agreement worked out this week.

Charles G. Clark, who also came under fire in June for his handling of a cheating incident at Middletown High school, was demoted to social studies teacher last month by the Frederick County school board.

At that time, county school officials defended Clark's role in the cheating scandal but said they believed his part-time job as a photographer was a conflict with his position as principal. They accused Clark of improperly using "a school secretary" to perform secretarial duties for his photo business.

Donald Koons, chief negotiator for the Frederick school board, said yesterday that after a week of discussions with Clark and the Frederick County Teachers Association, Clark was named vice principal, effective yesterday, of the 650-pupil Walkersville Middle School in the northeastern part of the county. Clark will retain his salary as a principal for one year, Koons said.

Clark, 37, said in a prepared statement yesterday that he "occasionally utilized the services of a school secretary to perform secretarial functions related to a private photography business of mine."

He also said he "permitted a business associate . . . to continue to provide photographic services to the students and school," as the associate had done before Clark became principal in 1978. "I now recognize the impropriety of such action . . . . "

Clark's assignment was changed a second time after 900 Middletown residents presented a petition to the school board Monday asking that Clark be reinstated at Middletown.

"We feel the school board is not listening to the needs of the community," said Barbra McHugh, one of the Middletown parents protesting the demotion. "If the school system won't listen to us, then we need an elected school board that will," she said.

In June, parents of five sophomore and junior students caught with answers to an exam protested their children's suspensions. They accused two Middletown vice principals of using "Gestapo-like" interrogations to "obtain confessions" from the students. But county officials defended the punishment and said the actions of administrators at Middletown High were proper.