  We show that a ferromagnetic (F) slab with the in-plane magnetization
sandwiched between two superconducting (S) films experiences strong
demagnetization effect due to the Meissner screening of the stray magnetic
field by the superconductors. In the extreme case the transition of the S films
from normal to the superconducting state can switch the demagnetization factor
from 0 to 1 which is in a sharp contrast with the S/F bilayers where such
transition affects the magnetic field inside the F film only slightly. The
giant demagnetization effect is shown to be qualitatively robust against the
decreasing of the superconducting film thickness and may provide a hint towards
the explanation of the anomalously large ferromagnetic resonance frequency
shift recently observed for the S/F/S structures [I. A. Golovchanskiy, N. N.
Abramov, V. S. Stolyarov, V. I. Chichkov, M. Silaev, I. V. Shchetinin, A. A.
Golubov, V. V. Ryazanov, A. V. Ustinov, and M. Yu. Kuprianov, Phys. Rev. Appl.
14, 024086 (2020)].
