Well - most people would say a 40 gallon is too small - for a Coral cat - and they're right. At least for a the long term.
But a baby coral could easily stay in a tank that size for several months (about 6) - especially with the footprint you have.
And $36 is a pretty good deal on these little guys.
Coral cats are a tropical water shark - that prefer water temps between 75-84 F. They are known to inhabit tidal pools in the wild. They are also known to be voracious feeders(more so than any Bamboo). And they max out at 27", although most average just 24". Coral cats are generally nocturnal - so feed after you turn out the aquarium lights
A single one would fine in a custom built 125-150 gallon tank with a foot print of 5' long x 2.75' wide.
Your tank filtration for your 40 gallon - should be at least 240 gallons per hr. Also make sure your Nitrate, Nitrite, & Ammonia level are triple zeros. The SG is around 1.022-1.024, and a PH of 8.2.
I would also recommend that you don't have other fish in the tank - unless it's another Coral cat or a bamboo shark. Coral cats will attack other types of fish. And some larger aggressive fish(lions, eels, groupers, angels, triggers, & puffers) have been known to kill small sharks. A few pieces of Live Rock would be good in the tank - to give the shark some places to hide during the daytime & help with filtration. As would live sand. Just remember to leave about 75% of the tank's floor open for swimming room.
And feed the shark about 3 times a week.
Also get Scott Michael's book - you may be able to find it on ebay cheaper than Amazon or the book store. And certainly cheaper than in most LFSs.
It will help in taking care of the shark.