Sharks niche is at the top of the food chain an their appetite helps keep control over their pray. A sharks habitat is in the open ocean in the marine ecosystem.
A deer's habitat is in the forest and it's niche is in the middle of the food chain and it's a herbivore and it's prey to large carnivores.
Crocodiles niche is that they are ambush hunters. A crocodiles diet consist of dragonflies, fish, turtles, frogs, birds, and mammals. A crocodiles habitat is in freshwater lakes and rivers.