More accurately, while you have a right as a citizen to enter the country, that does not mean border patrol cannot question you and, as stated above, if they opt to search you as a result - or as a result of some entirely different reason - they may. The difference between the correct answer and the ones offered above is that those operate under the false notion that if something is a right that means you can do that thing whenever you want, without limitations.
This is a misunderstanding of U.S. Constitutional law as well as the very basic rights we enjoy as humans. Being part of a society governed by the rule of law, there are certainly many things citizens are entitled to possess, receive, or do. However, the society agrees to cede a varying fraction of each of their rights to the collective with the recognition that nearly all of those things will be subject to limitation should a member of the society behave in an objectionable manner.
This is why we have laws that say you will be locked in a cell for many years (and in some cases, killed) if you kill someone. That does not mean you don't have the right to walk down the street. It means the extent to which people are allowed to exercise their rights have limitations. Limiting rights does not render them no longer rights.
That said, traveling is fundamental right. Under the Fifth Amendment, a citizen's liberty is protected in the clause which states, in part,
nor be deprived of life, liberty, or property, without due process of
The idea put forth above that the Fifth Amendment is
much more narrow than you think
is out of left field and wholly false. To the contrary,
The Fifth Amendment’s Due Process Clause does as much work as any provision in the Constitution. The Clause requires fundamental procedural fairness for those facing the deprivation of life, liberty, or property. The Clause also has been interpreted to place substantive limits on governmental authority
Obviously, denial of a passport does not mean that a right to travel is no longer a right. Bans on American citizens have been overturned as unconstitutional or upheld under the court's "rational basis" test. Cases include Aptheker (re: Cuba) and Zemel.