Why does CH3CH(OH)CH2CH3 give iodoform test?

The iodoform test is given by compounds containing $\ce{-(C=O)CH3}$ group or compounds which can be oxidized to such. 
$$\ce{ CH3CH(OH)CH2CH3}$$ 


Is a 2 degree alchohol and even though it were to be oxidized it would not contain a $\ce{-(C=O)CH3}$ group but according to a question asked by JEE in 1997 it as a matter of fact does give the test. 


**HOW?**




The substrate you have provided (2-butanol) would indeed give a positive test.


The iodoform test is performed in presence of iodine and potassium or sodium hydroxide, which first oxidizes the aforesaid compound to 2-Butanone.


**Mechanism** (taken from [this Wikipedia page](https://en.wikipedia.org/wiki/Haloform_reaction#Mechanism)) which shows $\ce{BrO-}$ instead of $\ce{IO-}$, but would be executed in a similar fashion:


[![Mechanism of secondary alcohol to ketone by the hypohalite ion](https://i.stack.imgur.com/v7VrW.png)](https://i.stack.imgur.com/v7VrW.png)


Thus 2-Butanone responds to iodoform test successfully.




---


**References:**


[Ueber Entstehung von Jodoform und Anwendung dieser Reaction in der chemischen Analyse, Lieben, *Ann. Spl. Bd.* 7, 218 **1870**](https://babel.hathitrust.org/cgi/pt?id=uiug.30112018225695&view=1up&seq=230)


 7