This paper addresses the solution of linear programming problems that further incorporate complementarity restrictions involving designated pairs of complementary variables, as well as its generalization where the objective function is a nonlinear continuously differentiable function. Such problems subsume mixed linear complementary problems, absolute value programs, the linear bilevel programming problem, and the bilinear programming problem as well as more general nonconvex quadratic programs, among many others. The existing research on these problems focuses on finding strongly stationary points, or more general B-stationary points, both of which are necessary characterizations for local minima. However, computing B-stationary points is more combinatorial since it involves characterizing solutions that turn out to be Karush–Kuhn–Tucker (KKT) points for an entire family of nonlinear programs. In special nondegenerate cases (where at least one of each complementary pair is nonzero in any complementary solution) or under a special linear independence constraint qualification, B-stationary points also turn out to be strongly stationary. Among several algorithms for computing such strongly stationary or B-stationary points, the most competitive method to-date is a complementary active-set algorithm (CASET) and its advanced variants. In several studies, it has been verified that this procedure works well, even for degenerate problems, outperforming other nonlinear programming approaches such as penalty methods, non-smooth optimization techniques, interior point methods, and sequential quadratic programming algorithms. The CASET algorithm requires an initial complementary feasible solution to start with, which can always be computed by using an enumerative method.