On graphs with equal dominating and c-dominating energy