Why is that the sizeof a,b,c,d,e isn't been counted?

In this lecture sir said that the size is determined by knowing place of ‘\0’ character.So when we cout s1’s size why is it that the size is showing 5 bytes only.Why not size of garbage(in this case [a,b,c,d,e]) isn’t taken into account.

@Harshit-Jha-2364832040305354 hey size of only that characters are taken jo hmne initialise kie hai ,compiler garbage ka size nhi leta or sizeof function garbage ko include nhi krta ,but print function print krte time use krta hai garbage ko ,hope you get it.

Then hum null character ka size kyun nhi account mein liye

@Harshit-Jha-2364832040305354 hm null character ko nhi lete char array me woh just ek symbol character hai jo ki end of char array ko represent krta hai .The null termination is only a trick used to allow flexible usage of character arrays for storing variable length strings. Character arrays need not end with a null character.