why this code is not giving o/p as 3?