Problem after power on

Dear friends,I am new in programming an Arduino UNO.My project is running fine.The problem is that after shutting down the power and giving power again on ,the program is frozen.I have to push the reset button my self.After reset everything is working fine.I expected that after the power is on the program would start or reset automatically .Could you suggest me something? Thank you in advance !

Post your code and a schematic.

What hardware are you using?