In case you are stopped by immigration officials, you are not obliged to answer their questions outside providing your identification.
If immigration does not know you are undocumented plus they do not have an order for your arrest, you would be likely released.
If you tell them you are undocumented you probably will be detained. You have the right to keep on silent. Use it.