In reply to shanthi:
I also ran this code with VCS it was giving output as expected can you explain why?