Correct choice is (d) \(e^{-jω(M-1)/2} \frac{sin(\frac{ωM}{2})}{sin(\frac{ω}{2})}\)
To elaborate: We know that the Fourier transform of a function w(n) is defined as
W(ω)=\(\sum_{n=0}^{M-1} w(n) e^{-jωn}\)
For a rectangular window, w(n)=1 for n=0,1,2….M-1
Thus we get
W(ω)=\(\sum_{n=0}^{M-1} w(n) e^{-jωn}=e^{-jω(M-1)/2} \frac{sin(\frac{ωM}{2})}{sin(\frac{ω}{2})}\)