That depends on the District Attorney and the details of the ticket or citation you have received, even in North Carolina. You can ask them something like “SafeDrivingNC.com offers a 4-hour course, may I take that?” Responses can very. You also will need to show proof that you took the course, so make sure you ask them what proof you need.
After completing all modules withing the course, and after you have passed the quizzes, you will receive a certificate.