I've heard that sit-ups can help prevent low back pain. Should I do military sit-ups or the stomach crunches?

Sit-ups can help keep your trunk strong when done correctly. But they're probably overrated as a way to avoid low back pain. Sit-ups generally strengthen upper abdominal muscles, but the lower abdominal muscles may also need to be worked to help with back pain. Strong lower abdominal muscles help hold your spine steady while you move. 

Therapists usually start thier patients in easier positions, such as lying on on their stomach or on hands and knees, in a crawling position.  The patient then tightens the lower abdominal area  by drawing it inward.  The exercises gradually get harder by having patients move their arms or legs against gravity, causing the lower abs to work harder. 

Abdominal crunches mostly strengthen the upper abdominals and are generally safe to do. Military sit-ups with locked feet, on the other hand, can actually hurt your lower back. Never put your feet under a bar or have someone hold your feet while you do sit-ups. This tightens up the hip flexor muscles, which can increase the arch of the low back.