To initialize an array partially, below 2 initializers look similar. Is there some difference under some condition? I assumed the first syntax would initialize all elements in the array as 1, but it is proved not to be the case.
int arr[2] = {1,};
int arr[2] = {1};
Another thought is the extra comma adds extra element to the array, like array size is 2 below. But this is also not the case.
int arr[] = {1,}; // sizeof(arr) / sizeof(int) is 1 instead of 2
I am wondering is there any specific usage of the extra comma in the above initializer.