created main.c, fixed bugs

fixed input bugs in address, changed addstudent from O(n) operation to
O(1) operation