The King took the opportunity to climb on board the footplate of Flying Scotsman as the Royal Train was pulled into a station by the famous steam locomotive.
Charles chugged into the market town of Pickering after a trip through the countryside on the North Yorkshire Moors Railway, which is celebrating its 50th anniversary.
Despite wearing a light-coloured suit, the royal visitor accepted an invitation from the crew, including driver Chris Cubitt, to step on to the footplate of the 100-year-old engine to see how Flying Scotsman works.
After leaving the station, the King was greeted by hundreds of well-wishers as he worked his way through the centre of Pickering on an extended walkabout, asking many of the schoolchildren who had gathered to see him whether they had enjoyed the half-term break.
Temperatures soared in the baking sunshine and one woman in the crowd appeared to faint just after Charles passed her, falling through the barrier just a couple of metres from where he was talking to the crowd.
The King turned and looked concerned for a moment as one his protection officers and his equerry moved to help her before a number of North Yorkshire Police officers stepped in.
Flying Scotsman’s driver, Mr Cubitt, said of Charles: “He said he enjoyed the trip.
“He’s a regular because he has been here before when he opened the station in 2000.
“He’s on his way to Scarborough now through my village.
“I invited him in for tea, but he said he couldn’t come.”
Mr Cubitt, who started working on the railways in 1961, said: “He’s interested in everything. He’s a good egg. He likes everything heritage.”
He added: “He was a gentleman.”
Asked if he felt more nervous than usual as he was pulling the King’s train, he said: “The driver’s job is to get to the destination on time, and what’s going on behind – doesn’t matter if it’s a load of cattle, fish, passengers or whatever – that’s somebody else’s problem.
“We look after the train and get it there safely.
“He’s the same as me. We all come into the world together. We’ve just got to look after each other whilst we’re there.”
Charles looked relaxed as he chatted with many of the hundreds of people who had gathered on both sides of Pickering’s sweltering Market Place.
As he worked his way up the hill, he visited some of the local shops, including a family butcher’s, which sells produce from the Duchy of Lancaster.
Inside Birdgate Chocolatiers, he asked for some Kendal Mint Cake, which he said he remembered from going on expeditions when he was young.
After around 20 minutes in the sun, the King moved into the cool atmosphere of St Peter and St Paul’s Church, which is famous for its medieval wall paintings.
Commissioned around 1450, the paintings, one of the most complete sets in Britain, were only accidentally rediscovered behind plaster in 1852.
The King was given a guided tour by Dr Kate Giles, co-director of the Centre for the Study of Christianity and Culture and senior lecturer at the University of York.
Charles made a point of chatting to the bell-ringers, who had been in action all morning, providing a musical backdrop to his visit.
He asked them whether young people are interested in taking up the hobby, and was told they are not.
He asked about the different rings he had heard during his visit.
“What are you going to ring when I go?” he asked them.
“What do you want?” one of the group replied, making the royal visitor laugh.
The King replied: “I’m not sure. I’ll leave it to you.”
As he signed the visitors’ book, the King was told by the Reverend Gareth Atha that Queen Mary had visited the church in 1937.
Charles said: “I remember my great-grandmother very well.”