The King told a cancer patient "I'm not too bad" when he was asked about his own recovery during a visit to open a new hospital.
Charles also said "half the problem is detecting it in time" and said: "The great thing I think is they're getting better and better at dealing with these things.”
"There's always hope down the road, he added.
In a separate meeting, he joked that he was "discovering" that "bits don't work so well once you get past 70".
He met with Matthew Shinda during a visit to the Midland Metropolitan University Hospital to officially open it.
Matthew told the King about his cancer revealing: "Last stage. I could go today, I could go tomorrow."
Matthew was with daughter Philippa Matthew, 52, younger sister Jessie Sharif, 60, and wife Elizabeth Shinda, 74.
The King has been undergoing cancer treatment since January last year. He went to hospital for an enlarged prostate when doctors discovered he had the disease.
The Palace has not confirmed what type of cancer Charles has, but it is understood not to be prostate.
King Charles asked how long Matthew had been here and asked: "Have they been giving you all the right treatment? Marvellous nurses."
And he joked that "you have to go up endless lifts to go anywhere" in the building.
Matthew said to the King: "It's nice to see that you're recovering well."
The King replied: "I'm not too bad thank you very much." Matthew told him: "I have the same disease. It's prostate. Last stage. I could go today, tomorrow."
Charles said: "Half the problem is detecting it, isn't it, in time."
-in-Sm.jpeg?trim=250%2C0%2C0%2C0)
Matthew then explained how he had been diagnosed when doctors found a previously undiscovered lump.
Charles said: "As long as they're making you comfortable.
Matthew said: "Of course. That's one of the priorities. Making me comfortable.
Charles said: "The great thing I think is they're getting better and better at dealing with these things. The trouble is there's always hope down the road.
"I am sorry about that, it's so frustrating. "We're probably about the same age are we?"
Matthew said the King was about one year older, which Charles laughed at.
Matthew then said he would like a drink, and told the King he likes anything "as long as it's nice".
Charles joked he should have brought a whisky, saying: "It's supposed to be very good for the heart".
Charles also asked about his daughters and grandchildren, and said he was "lucky" to have two daughters who were taking turns to come and visit.
Matthew said after the visit: "I was elated. He showed concern."
Charles later told retired milkman Philip Barnard, who told the King he has lung cancer, that there is "huge progress in treatment".
Earlier, Charles met Jacqueline Page, 85, who lives in Great Barr with her husband Jeff, 82. Her father met the then Prince Charles when he came to Brimingham in 1978.
Charles said: "I do hope this isn't causing too much interruption. "
Jacqueline told him: "Lovely to meet you. I wish it was in better circumstances."
-in-Sm.jpeg?trim=0%2C20%2C0%2C20)
"Charles told her: "I hope you're being looked after."
She said: "I'm having the best attention, I can assure you."
Jacqueline joked: "I'm wearing out."
And Charles joked in response: "Well this is the terrible thing, as I'm discovering already, bits don't work so well do they once you get past 70."
He asked Jeff how he was coping at home, and he asked Jacqueline about her treatment.
They told him that they had been married 40 years.
And Jacuqeline told him: "I've met you before. Perry Barr stadium. You came in a helicopter and you got out of the helicopter and you walked straight towards my parents."
He joked: "That was a bit of luck, wasn't it?"
She said: "They shook hands with you. I didn't get a look in, so I'm so delighted you're talking to me today."
Charles said: "It was a wonderful old helicopter I seem to remember. I used to fly it. Because I'd flown them in the Navy. I left the Navy in 1976 but i could still remember how to fly it. That was the great thing. "I'm so glad I've got to meet you."
-in-Sm.jpeg?trim=125%2C0%2C125%2C0)
He later met Hernata Yonas, who was the first baby born in the hospital. He asked mum Semhar Tesfu and dad Yonas Kflu about the hospital.
Hernata arrived at 8.48am - just over 90 minutes after the maternity department opened its doors.
Yonas said it was "great" that the King showed interest.
Charles also met Elsie Kudozia, 37, and baby Elyanna, who was born in the hospital on Monday.
Asked how she felt after speaking to the King, Elsie said: "I can't explain it. It's very nice."
There were huge cheers from the crowds as he greeted them and others who worked at the hospital.
And just before Charles unveiled a plaque, ex NHS chief and chairman of the hospital Sir David Nicholson told the crowd: “Your Majesty, guests, colleagues, and friends.
“It is a tremendous honour to stand before you today on this momentous occasion. This is a day of immense pride, not just for those of us who have been part of this project from its inception, but for the entire community who will benefit from this world-class facility for generations to come. “Your Majesty, it is with the deepest gratitude and immense pride that we welcome you here today to officially open Midland Metropolitan University Hospital.”
Sandwell and West Birmingham NHS Trust provides community, hospital, and general practice-based care, serving a population of 750,000 local people.
Midland Metropolitan University Hospital opened its doors on Sunday 6th October 2024 and is one of the biggest hospitals to open in England in the last decade.
MMUH reconfigured two hospitals - City Hospital and Sandwell Hospital - which allowed the combination of two workforce rotas and investment in new roles to establish a new seven-day service model, where consultants are based on wards every day, supported by a junior medical workforce.
The Trust has established a Learning Campus on the MMUH footprint, opening this summer.
In partnership with Sandwell College, Wolverhampton and Aston Universities, the Trust will provide over 1,280 new learning opportunities for the local population. The Trust received £20 million investment from the West Midlands Combined Authority (WMCA) and Sandwell Council to establish this new facility, which is a net zero project.