The PDF versions of the code (vs the HTML versions linked below), are the only way to get a detailed subject index of the (subpart) code sections. You can use the web site to search for a subject, but this will not help you during an exam.
If you're taking an exam administered by PSI, they publish their own version of code sections that apply to construction. Supposedly, all of their exams are based on these published excerpts, however, the “current” PSI published version is is out-of-date.
If you're taking an exam that does not use a third party testing company, or you're applying for a license in a state that tells you to obtain Title 29, Part 1926 from the Government Printing Office (GPO), it may be difficult to figure out which sections of the OSHA code apply to your exam.
A resource that may be helpful in simplifying the process of purchasing OSHA study materials specific to construction exams is:
The code sections that are specific to state licensing are as follows:
Links to Federal Codes (full HTML text)