I have written a piece of code as following:

```
var i=5;
i='K';

```

The code is being compiled without an error. As far as my concept is concerned, I cannot re-assign a value in var. Since I have assigned integer 5 to i. the type of i is int. Then why it is allowing to assign a char 'K' in i?