The bending modulus of individual carbon nanotubes from aligned arrays grown by pyrolysis was measured by iii situ electromechanical resonance in transmission electron microscopy (TEM). The bending modulus of nanotubes with point defects was similar to 30 GPa and that of nanotubes with volume defect was 2-3 GPa. The time-decay constant of nanotube resonance in a vacuum of 10(-4) Torr was similar to 85 mu s. A femtogram nanobalance was demonstrated based on nanotube resonance, it has the potential for measuring the mass of chain-structured large molecules. The in situ TEM provides a powerful approach towards nanomechanics of fiberlike nanomaterials with well-characterized defect structures.