If you feel that you have nothing to hide, and that challenging the law enforcement officer would be more bother than it's worth, you can give law enforcement officers consent to search your car. With consent, the officer does not need a warrant, does not need probable cause and can take custody of evidence obtained.
You do not have to give consent to a law enforcement officer to search your vehicle. While you do not have to consent, bear in mind that the expectation of privacy in a car is less than the expectation of privacy in your home. Based in part on the lessened expectation of privacy in a car, law enforcement officers are permitted to conduct a warrantless search of a car if the officer has probable cause.
Probable cause exists where the facts and circumstances would cause a reasonable person to believe that evidence of a crime could be located in the area to be searched. With probable cause, law enforcement officers may search any area of the vehicle where the probable cause leads him/her to believe that evidence may be found. In addition to a probable cause search, any time a law enforcement officer sees evidence of a crime in his/her "plain view," s/he can immediately seize the evidence without a warrant.