Energy saving and high delivery reliability are two essential metrics in wireless ad hoc networks. In this paper, we propose a joint power control and network coding (PCNC) scheme which regulates the transmission power to reduce the overall energy usage and uses network coding to improve reliability by reducing the number of packet retransmissions. To argue for PCNC scheme, we investigate both unicast and multicast routing scenarios. To evaluate routing optimality, we adopt expected utility as a metric, which integrates energy cost, reliability, and benefit value. Based on the expected utility, we explore the optimality in both unicast and multicast routing. For unicast routing, we propose an optimal algorithm. We show the NP-hardness of multicast routing problem, and also design a heuristic solution. Results from simulations demonstrate that PCNC improves the performance in terms of expected utility compared with existing techniques.