Charles has begun a schedule of regular treatments and has been advised to postpone his public-facing duties, with Prince Harry rushing back from the US to see his father.
Mr Sunak said he was “wishing His Majesty a full and speedy recovery” in a message on X, formerly Twitter.
The Conservative leader added: “I have no doubt he’ll be back to full strength in no time and I know the whole country will be wishing him well.”
The Labour leader tweeted: “On behalf of the Labour Party, I wish His Majesty all the very best for his recovery.” Sir Keir added: “We look forward to seeing him back to swift full health.”
Liberal Democrat leader Ed Davey said his party “joins the rest of the nation in wishing a full and quick recovery to His Majesty”.
Wishing His Majesty a full and speedy recovery.
I have no doubt he’ll be back to full strength in no time and I know the whole country will be wishing him well. https://t.co/W4qe806gmv
— Rishi Sunak (@RishiSunak) February 5, 2024
Commenting on the news in the Commons, Speaker Sir Lindsay Hoyle told MPs: “I know the whole House will wish to join me in expressing our sympathies with His Majesty the King following the news announcement this evening.
“Our thoughts are, of course, with His Majesty and his family, and we’d all wish to send him our very best wishes for the successful treatment and a speedy recovery following tonight’s news.”
Prince William could take on some of the King’s work as he is expected to return to public duties on Wednesday after the Princess of Wales’ major abdominal surgery last month.
It is also understood that Charles will continue to be available for Privy Council meetings, but details of how they will take place are still being worked through.
It is expected that alternative arrangements will be made for his weekly audience with Mr Sunak – should doctors advise him to minimise any in-person contact.
Former Tory PM Boris Johnson said the whole country “will be rooting for the King today”, adding on X: “Best wishes to Charles III for a full and speedy recovery.”
And ex-PM Liz Truss also tweeted: “Sending every best wish to His Majesty The King and the Royal Family as he undergoes his treatment for cancer. He will be in our thoughts and prayers. God Save The King!”
The former Labour prime minister Tony Blair said he was “wishing His Majesty the King a full, swift recovery and return to excellent good health”.
Senior political figures also praised the King for making his diagnosis public. Health secretary Victoria Atkins wrote on X: “His decision to share his diagnosis to assist public understanding for all those affected by cancer is commendable.
The cabinet minister added: “Wishing His Majesty the very best and look forward to seeing him resume his public duties.”
And Labour’s shadow health secretary Wes Streeting, who received treatment for kidney cancer in 2021, said: “One in two of us will develop cancer during our lives, but millions more are affected when someone they love is diagnosed with cancer.
Mr Streeting added: “Sending best wishes to His Majesty for his treatment and to his family as they support him throughout.”
Scotland’s first minister and SNP leader Humza Yousaf said his “thoughts and prayers” were with the King. “I wish him the very best for a speedy recovery and return to public life.”
He said he was thinking of the Queen Camilla and other royal family members “at what I know will be a worrying time for them all”.
Mark Drakeford, the Labour first minister of Wales, said he was “saddened” to hear the news of the cancer diagnoses and wished the King a “full and swift recovery”.
Northern Ireland’s new first minister, Sinn Fein’s Michelle O’Neill, also said she was “very sorry to hear of King Charles’ illness and I want to wish him well for his treatment, and a full and speedy recovery”.
Deputy first minister, the DUP’s Emma Little-Pengelly added: “I, like many people throughout Northern Ireland, will keep him and his family in my prayers.”