Go language provides inbuilt support for bits to implement bit counting and manipulation functions for the predeclared unsigned integer types with the help of bits package. This package provides Rem32() function which is used to find the remainder of (h, l) divided by a. This function will panics if a == 0 (division by zero) and it doesn’t panic if quotient overflow. To access Rem32() function you need to add a math/bits package in your program with the help of the import keyword.
func Rem32(h, l, a uint32) uint32
Parameters: This function takes three parameters of uint32 type, i.e., h, l, and a.
Return Value: This function returns the remainder of (h, l) divided by a.
Number 1: 3 Number 2: 5 Number 3: 2 Remainder: 1
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.