when i compile and execute the above code onCode:#include <stdio.h> int main(void) { const int a; printf("%d\n\n\n", *a); return 0; }
a) Windows, Visual Studio (compiled as C code): it gives one warning on compilation and crashes on execution
b) Linux, and compiled using gcc and flags -Wall: there are no warnings and prints a garbage value on execution
c) Windows, Visual Studio (compiled as C++ code): does not compile and throws an error
what is the expected behaviour in this case??