Illegal? I don't see why it would be. (IANAL)
Is it a smart thing to do? No. You could confuse border agents, and you don't want to get off on the wrong foot with border agents. At best they'll give you some extra scrutiny, in the worst case they'll think you were deliberately trying to deceive them.