//Enabling the content approval for library
try
{
string libraryName = "LibraryName";
SPList list = web.Lists[libraryName];
if (list != null)
{
list.EnableModeration = true;
list.Update();
}
}
catch (Exception ex)
{
//Handle the exception
}Code snippet for Programmatically enabling the content approval for the library.
