Cisco devices will commit a command that you typed in configuration mode when you hit Ctrl+Z to fall back to enable mode.
For example, while configuring an interface, if you type
and then press Ctrl+Z to exit configuration mode, the
command is executed. Note, that this does not happen in PacketTracer,
but it does happen in GNS3, and -of course- on real devices.