Give a stream of consciousness and then the final answer. Founded in 1789, the University of North Carolina at Chapel Hill is one of three schools to claim the title of oldest public university in the United States. It closed from 1871 to 1875, faced with serious financial and enrollment problems during the Reconstruction era. In 1877, the State of North Carolina began sponsoring additional higher education institutions. Over time the state added a women's college (now known as the University of North Carolina at Greensboro), a land-grant university (North Carolina State University), five historically black institutions (North Carolina A&T State University, North Carolina Central University, Winston-Salem State University, Fayetteville State University, and Elizabeth City State University) and one to educate American Indians (the University of North Carolina at Pembroke). Others were created to prepare teachers for public education and to instruct performing artists.

Based on this passage, when was the university of north carolina founded?
To answer this question, we should know that: Founded in 1789, the University of North Carolina at Chapel Hill is one of three schools to claim the title of oldest public university in the United States.
So, the final answer is 1789.