A not necessarily continuous, linear or multiplicative function θ from an algebra A into itself is called a 2-local automorphism if θ agrees with an automorphism of A at each pair of points in A. In this paper, we study when a 2-local automorphism of a C * -algebra, or a standard operator algebra on a locally convex space, is an automorphism.