I am pretty new to programming and I want to know how to detect a memory leak? If you are going to recommend a utility, please try to find one that works on Mac OS X Lion.
P.S. I tried valgrind, it doesn't work on 10.7/Lion.
Valgrind is an excellent cross platform tool http://valgrind.org/
And best of all its Open Source
I'd recommend Instruments (which comes with Xcode). I admit I've never used it for C, but works well with Objective-C.
valgrind - http://valgrind.org/ is pretty good
or mudflap - http://gcc.gnu.org/wiki/HomePage but i'm not sure if mudflap works on Mac OS though ,it works on most the linux platform, you could try =)