It depends on the state's laws and/or whether or not the cop has probable cause to get a search warrant issued.
Unfortunately there is nothing prevent cops from intimidating er ah encouraging you from allowing them to perform a search without a warrant.
We've gone a long ways away from the constitution and police protecting and serving. Know your rights, be courteous, shut up and if needed lawyer up.
Police are no different than they were decades ago. It is a shame we have cell phone videos making people think that is the case.