0

How does array work when [] is empty

How does array work when [] is empty Like char e[] = "char array"; How many characters are allowed?

29th Jan 2020, 2:45 AM
ich
5 ответов
+ 4
When [] subscript is empty It automatically fills the space by counting the no. Of elements initialized within the quotes. And since it is collection of array Which means it forms string So at last a null '\0' character is added And every character is held with subsequent index starting with 0 for the first character.
29th Jan 2020, 2:58 AM
Shubham kumar
Shubham kumar - avatar
+ 2
It means In contiguous form Like 0 1 2 ....and so on
29th Jan 2020, 3:22 AM
Shubham kumar
Shubham kumar - avatar
+ 1
Thank you. I thought so.
29th Jan 2020, 3:21 AM
ich
+ 1
You're welcome🥰
29th Jan 2020, 3:21 AM
Shubham kumar
Shubham kumar - avatar
0
Subsequent index means what?
29th Jan 2020, 3:22 AM
ich