Number of crests and trough produced = 40
Time taken, t = 0.4 second
One wave corresponds to 1 crest and 1 trough.
Hence, 40 waves is equal to 40 crests and 4 troughs.
Therefore,
Frequency of the wave,
ν = Number of waves/time taken = 40/0.4 = 100 Hz