Example of Subring is commutative whereas whole ring is not commutative??
sure.
let R = the ring of all 2x2 matrices with integer entries. this is clearly a non-commutative ring (for example, the matrices:
$\displaystyle A = \begin{bmatrix}1&0\\1&0 \end{bmatrix};\ B = \begin{bmatrix}1&1\\0&0 \end{bmatrix}$
do not commute).
but the matrices of the form:
$\displaystyle K = \begin{bmatrix}k&0\\0&k \end{bmatrix},\ k \in \mathbb{Z}$
form a sub-ring of R isomorphic to the integers, which is thus commutative.