The second part of our study is devoted to an analysis of the exactness of penalty functions for optimal control problems with terminal and pointwise state constraints. We demonstrate that with the use of the exact penalty function method one can reduce fixed-endpoint problems for linear time-varying systems and linear evolution equations with convex constraints on the control inputs to completely equivalent free-endpoint optimal control problems, if the terminal state belongs to the relative interior of the reachable set. In the nonlinear case, we prove that a local reduction of fixed-endpoint and variable-endpoint problems to equivalent free-endpoint ones is possible under the assumption that the linearized system is completely controllable, and point out some general properties of nonlinear systems under which a global reduction to equivalent free-endpoint problems can be achieved. In the case of problems with pointwise state inequality constraints, we prove that such problems for linear time-varying systems and linear evolution equations with convex state constraints can be reduced to equivalent problems without state constraints, provided one uses the L ∞ penalty term, and Slater's condition holds true, while for nonlinear systems a local reduction is possible, if a natural constraint qualification is satisfied. Finally, we show that the exact L p -penalization of state constraints with finite p is possible for convex problems, if Lagrange multipliers corresponding to the state constraints belong to L p ′ , where p ′ is the conjugate exponent of p, and for general nonlinear problems, if the cost functional does not depend on the control inputs explicitly.