The following snippet compiles perfectly with C/C++ compiler:
#include <stdio.h>
int main()
{
int x = {5}; //<-- why this compiles?
printf("x = %d",x);
return 0;
}
The output is 5
.
x
is initialized here in a compound-type form although it's of integral type. I would like to understand what conversions are made here and why.