We all know pointers are variables that are used to hold memory addresses. And since they deal with memory addresses, they can cause all sorts of bugs if they are not used carefully. So naturally…