If at the time of sentencing, the judge for any reason determines to impose a sentence other than provided for in a plea arrangement between the parties, the judge must inform the defendant of that fact and inform the defendant that he may withdraw his plea. Upon withdrawal, the defendant is entitled to a continuance until the next session of court.
N.C. Gen. Stat. § 15A-1024