King Charles was diagnosed with cancer while he was undergoing treatment for an enlarged prostate last month.