Sharks are a type of fish, which belongs to the class Ichthyoplasmata, and are relatively primitive. Sharks reproduce as oviparous and they can also keep their body temperature constant so that they are strong enough to attack quickly, but a shark is not a mammal because it breathes through its gills and doesn't feed its young, whereas a mammal breathes through its lungs and feeds its young.
So sharks are not mammals.