Washington (CNN) President Barack Obama has a message for Donald Trump — being president is tougher than being on a reality show and the American people are too "sensible" to elect him.

"I continue to believe Mr. Trump will not be president," Obama said at a news conference in California after a meeting with southeast Asian leaders . "And the reason is that I have a lot of faith in the American people. Being president is a serious job. It's not hosting a talk show, or a reality show."

He went on: "It's not promotion, it's not marketing. It's hard. And a lot of people count on us getting it right."

The comments marked a political resurgence for a lame-duck President in his final year in office. Obama offered surprisingly frank assessments of the campaign to replace him, taking shots at Ted Cruz and Marco Rubio . He also hinted hint that he was sympathetic to Hillary Clinton's position on the difficulty of enacting political change, as she faces a tough challenge from a candidate in Bernie Sanders , who has fired up Democratic primary voters who are demanding sweeping reform.

But it was the potential of a Trump administration that Obama seemed most eager to critique.

Photos: Campaign slogans Photos: Campaign slogans A Ronald Reagan campaign button shows his 1980 slogan, "Let's Make America Great Again." Hide Caption 1 of 8 Photos: Campaign slogans For his 2016 campaign, Donald Trump's slogan is "Make America Great Again," an echo of Reagan's. Here a supporter wears the slogan on a button. Hide Caption 2 of 8 Photos: Campaign slogans Hillary Clinton has used the slogan, "Hillary for America" and also had supporters display posters saying "Fighting for us." A member of the audience holds a campaign sign at the top of a set of bleachers as Clinton speaks in Iowa on January 30. Hide Caption 3 of 8 Photos: Campaign slogans Campaign buttons for Democratic presidential candidate Bernie Sanders highlight his "Feel the Bern" slogan. Hide Caption 4 of 8 Photos: Campaign slogans "I Like Ike" decal from the 1952 presidential campaign, showing a close-up portrait of Dwight D. Eisenhower, the popular World War II general who went on to serve two terms as president. Hide Caption 5 of 8 Photos: Campaign slogans Republican presidential candidate Sen. Marco Rubio signs autographs under his "A New American Century" slogan at a campaign rally February 5. Hide Caption 6 of 8 Photos: Campaign slogans Republican presidential candidate and former Florida Gov. Jeb Bush speaks to supporters during a rally on his "Jeb Can Fix It" tour on November 2, 2015. Hide Caption 7 of 8 Photos: Campaign slogans President Harry Truman's 1948 election campaign made the expression "Give em hell, Harry!" famous. Hide Caption 8 of 8

The presidency isn't "a matter of pandering and doing whatever will get you in the news on a given day. And sometimes, it requires you making hard decisions even when people don't like it," Obama said, adding that whoever succeeds him needs to be able to reflect the importance of their office and give foreign leaders confidence he or she knows their names and something about their nations' histories.

Obama also appeared to raise the question of whether Trump was prepared to be commander-in-chief.

"Whoever's standing where I'm standing right now has the nuclear codes with them, and can order 21-year-olds into a firefight, and (has) to make sure that the banking system doesn't collapse, and is often responsible for not just the United States of America, but 20 other countries that are having big problems, or are falling apart and are gonna be looking for us to something."

He added: "The American people are pretty sensible, and I think they'll make a sensible choice in the end."

Trump responded to Obama during an event in Beaufort, South Carolina.

"He has done such a lousy job as president," Trump said, before adding that he didn't mind being targeted by Obama, saying he took it as a "great compliment."

Trump wasn't the only Republican who took a shot from the President.

Photos: Trump campaign: 11 outrageous quotes Photos: Trump campaign: 11 outrageous quotes Hide Caption 1 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 2 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 3 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 4 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 5 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 6 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 7 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 8 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 9 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 10 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 11 of 12 Photos: Trump campaign: 11 outrageous quotes Hide Caption 12 of 12

When he bemoaned Republican warnings that his nominee to replace late Justice Antonin Scalia on the Supreme Court would not even get a hearing, Obama rebuked people who claim to be "strict interpreters" of the Constitution -- except regarding his right to propose a nominee.

That seemed to be a clear jab at Cruz, who has helped lead calls to prevent the president installing a nominee who could tilt the ideological balance of the court to the left.

Rubio also came under fire when the president mocked "a candidate who sponsored a bill, that I supported, to finally solve the immigration problem, and he's running away from it as fast as he can."

The President stepped more carefully when he was asked about the Democratic race. He opened by making it look like he was delivering a veiled endorsement of Clinton, who is facing a stronger than expected challenge from Sanders.

"You know, I know Hillary better than I know Bernie, because she's served in my administration, and she was an outstanding secretary of state. And I suspect that, on certain issues, she agrees with me more than Bernie does," Obama said.

But then added: "On the other hand, there may be a couple issues where Bernie agrees with me more. I don't know, I haven't studied their positions that closely."

Obama who, like Sanders, once wowed young Democrats with soaring calls for change in the 2008 election, also appeared to give credence to Clinton's election argument that pushing through fundamental reforms is harder than it looks.

"Ultimately, I will probably have an opinion on it, based on both -- (having) been a candidate of hope and change and a President who's got some nicks and cuts and bruises from -- you know, getting stuff done over the last seven years."

Obama was clear on one thing -- he's happy not to be in the race himself.

"The thing I can say unequivocally," he said, "I am not unhappy that I am not on the ballot."