vineet chaturvedi wrote:I got it it assigns each it null character........simple
Not necessarily a
null character. If you reassign each
char in that array to anything, you can delete the password, but its length will remain. If the array turns into [#,#,#,#,#,#,#,#], a malicious person can tell that the password contains 8 characters and no more. Reassigning the whole array to ['p','a','s','s','w','o','r','d'] might have the same effect.
And welcome to the Ranch