Adam Mahmoud Sulaiman was taken into custody by university police Sunday.
The rifle was found inside his vehicle that was parked on Cates Avenue.
North Carolina law, General Statute 14-269.2, prohibits any person, including a concealed handgun permit holder, from carrying a firearm, openly or concealed, on educational property.
A person may legally possess a firearm on a campus if they meet certain criteria.
Sulaiman did pay his bond is now out of jail.
He was due in court Monday afternoon.