If 7 points out of 12 are in the straight line, then the numbers of triangles formed by joining them is
185
The number of ways of selecting 3 points out of 12 points is 12C3.
The number of ways of selecting 3 points out of 7 points on the same straight line is 7C3.
Hence the number of triangles formed will be 12C3−7C3=185.