Please follow this link..I have commented my doubts in the program
https://onlinegdb.com/r12zfCruL
using character array & providing input as "kjlp" where I expect the output of strlen of array to be 4; but in some cases it is different which outputs 6. Why so??