When a defendant appears for judgment, the defendant must be informed by the court, or by the clerk under its direction, of the nature of the charge against the defendant, and of the defendant's plea, and the verdict, if any, thereon, and must be asked whether the defendant has any legal cause to show why judgment should not be pronounced against the defendant.
N.D.C.C. § 29-26-11