A string is fastened tightly between two walls 24cm apart. The wavelength of the second…