A Contact can only ever exist in one static Address Book. The identification fields you have configured will determine the unique identifier for that Contact and thus determine what is considered a 'duplicate'.
However, Contacts can show up in multiple Dynamic Address Books and they in turn can be assigned to multiple Publications.
So it depends on what you are looking for:
- If you want your visitor to have the same account on multiple sites (i.e. changes on one site also takes effect on the other sites), you could store the Contact in a single static Address Book and use Dynamic Address Books to share them across different Publications. You would then synchronize the static Address Book to a shared database across all of the sites.
- If you want your visitors to be able to sign up with the same details on different sites, but have the accounts be completely separate, you could store the Contacts in separate Address Books per site, synchronize them to separate databases per site, and ensure that you have multiple identification fields -- one of which is unique to the site. This is what the default fields and sample pages do: the unique identifier for a Contact is a combination of an e-mail address and an identifier for the site.
- You can mix and match the above approaches to suit your needs.
As for how to do this programmatically, the static Address Book that the Contact is created in should be specified in the AddressBookId property of the Contact object when creating it on the website.