Drupal 6 Can I use subdomain, for the dev instance of a site and use multiple site configs
Short answer is: if example.com exists in the sites folder and a settings.php file is inside it, that file will be selected to serve any request directed to *.example.com.

Long answer is:
let's say an url such as "an.example.com/something" is requested and such request reaches Drupal, here is what happens:


Does a settings file exist in a folder named an.example.com.something (inside the sites/ folder)?
Does a settings file exist in a folder named example.com.something?
Does a settings file exist in a folder named com.something?
Does a settings file exist in a folder named an.example.com?
Does a settings file exist in a folder named example.com?
Does a settings file exist in a folder named com?
Serve the default website.


If at any point of the process the answer to the question is yes, then that file is selected as the settings file.
Of course it will work with more complex subdomains and also more complex paths, as well as port numbers. Have a look at the official Drupal documentation on multi-site and at the conf_path() function for more details.