Yugoslavia (1943.-1992.) did not have a king. If we are talking about first Yugoslavia, Kingdom of Slovens, Croats and Serbs then yes, it did have a king, but as we are talking about communist Yugoslavia after WWII, it did not.
Kingdom of Serbs, Croats, and Slovenes existed from 1918 to 1929. It was renamed to Kingdom of Yugoslavia, in 1929 and from then to dissolution of Yugoslavia country used to carry a name "Yugoslavia", just with different prefix before it. During this quiz, it was never assumed or said that this quiz was focused strictly on Socialist Yugoslavia, but rather on Yugoslavia as a whole (during its history). Plus question is pretty straight forward, since USSR was never a monarchy, therefore only answer can be Yugoslavia. :)
P.S. Also, there wasn't such thing as Kingdom of Slovenes, Croats and Serbs, but rather a State of Slovenes, Croats and Serbs which joined Kingdom of Serbia and formed Kingdom of Serbs, Croats, and Slovenes, which was later renamed to Kingdom of Yugoslavia as I meantioned before.
P.S. Also, there wasn't such thing as Kingdom of Slovenes, Croats and Serbs, but rather a State of Slovenes, Croats and Serbs which joined Kingdom of Serbia and formed Kingdom of Serbs, Croats, and Slovenes, which was later renamed to Kingdom of Yugoslavia as I meantioned before.