The energy change in a chemical reaction is a function of all of the bonds broken (endothermic) and all of the bonds formed (exothermic).
It must also take into account any change of states.
It is not possible to infer whether a reaction is exo- or endothermic just by looking, you would have to consider all of the bond energies and changes of state.
If a reaction is endothermic there must be some thermodynamic benefit in terms of a positive entropy change for it to be possible. The feasibility of a reaction is determined theoretically by consideration of the potential Gibbs free energy change.