CPallini has already shown how to fix your program. Here are a couple more hints about programming style that might help you along your way.
Good naming is very important in a program. In your example, some of the names are misleading:
const int id = 5;
const char grade = 5;
How about naming them
arraySize
. And you just need one, because by design both arrays should always have the same length. And once we have defined this nice constant, why not use it all places where the array size is specified:
enter(student, course, arraySize);
exit(student, course, arraySize);
By the way, exit is a very misleading name for that function. You certainly meant to call it
show_data
or something similar.
One of the tricky things in C is that arrays and pointers are somehow related and every C textbook will tell you that the expression "*(ar+i)" is exactly the same as "ar[i]". Only, the latter is a lot more intuitive. So why don't we write:
cin >> ar[i];
and
cout << a[i] << "\t" << yo[i] << endl;
There are still more things to improve; for example the parameter names of the two functions (ar, yo ...) are all but intuitive.
Hope that helps you improve your programs.