Donald Trump has won the battleground state of North Carolina.