Where do I start? I start by ignoring the numerous problems with this program, and why it will fail under many easily foreseeable circumstances.
Apologies if I seem to be bashing you, but really we could discuss the problems with this short piece of code for more than half a semester.
Also, please use the code-formatting tags, it makes it easier to read and comment on the code you post.
Primarily your use of the variable "arr" is confusing to say the least. You've declared a global variable, and are now passing the address of same variable to a function that can of course see the global definition, and then you use a local variable of the same name but different type (one is a pointer and the other is a pointer to pointer), so in your function input(), which "arr" is being used? "local student **arr" or "global student * arr"? You know which one you want it to be, but wishes aren't horses, which is probably why you're learning to program :)
In input(), you're filling up an array of pointers to student, but in display, you're accessing an array of objects, how can this work?
Je repete: there are too many fundamental issues to address here, but quick and dirty if you want to make this "work" is to do as shown below. Line numbers are approximate because someone didn't format their code :(
line 13: change from student *arr to student **arr
line 14: change from void input(student **arr,int spt) to void input(int spt)
line 26: change from cout<<"the first student: "<<arr.name to cout<<"the first student: "<<arr->name
line 31: change from input(&arr,2) to input(2)
Also don't forget to delete  arr when you're done in main()
Finally, don't be discouraged, keep practising, READING books, articles, etc. Carefully consider others comments however harsh and unjustifiable they may seem.