What is the use of memset?

memset(pre,0,sizeof(pre)) // why are we using this and how it is working?

It is used to intialize the array.
Using that line , each array position is initialized with a value 0