prem pillai wrote:Have a look at string functions like substring(..) , indexOf(..) , lastIndexOf(..) , charAt(..) etc.
For example , the below code will print 1.
What about this is unclear? What would you expect this to print? Why do you think this is wrong? We can't help you if you don't explain what you think the problem is.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors