Leaving the brackets empty in a declaration

I have characters in my code where I leave the brackets blank. By default, does the program know how many bytes i am using or does it use the max automatically? I have an example below where my brackets are blank. I am just wondering if its more efficient to specifiy the bytes in my character as opposed to just leaving it blank. Thanks

char ssid[] = "myhomenetwork";

As you have it the compiler will count the bytes necessary for you, including the terminating null character.

There are two ways to initialize an array variable - either provide the contents, in which case they define the length, or you don't provide the contents (in which case you must provide the length in [ ] brackets).

int arr [] = { 1, 2, 3, 4, 2323 } ;

int arr2 [24] ;

The string constant is a concise notation for an array of char.

There are two ways to initialize an array variable - either provide the contents, in which case they define the length, or you don't provide the contents (in which case you must provide the length in [ ] brackets).

You can also specify both size an initialisation parameters. This is useful when you have a fixed length array and know the data - the compiler will complain if the number of initialisers and array size don't match. This can save weird bugs if the array is not initialised completely. Don't use this often, but it has caught errors for me and is worth knowing.