The home inspectors I have worked with have required payment at time of service for a buyer's home inspection; therefore, this cost is not typically included in the closing costs. The appraisal may be included in the closing costs if the lender does not request paying this fee upfront; sometimes referred to as paying outside of close or POC.
With lending getting tighter and tighter, I have heard some comments from lenders that they are considering having an independent home inspection performed for certain loan products. When and if this occurs, you may see an inspection as part of the closing costs.
In general, buyer closing costs are 3% of the sales price. However, several closing costs are relative to the loan amount, such as, morgage inpsurance premium (MIP), the mortgage registration (MRT), and the loan origination fee; and other closing costs are relative to the time of close, such as, tax prorations, upfront interest payments, and escrow requirements. RESPA laws require that the lender provide you a good faith estimate within specific time frames. Talk with your lender about the requirements to insure that it does not hold up the close of the sale. Good Luck.