0
Why is the following code showing an error? Explanation needed.
1 Antwort
+ 5
It's better to initialise like this it will take size automatically according to elements
int arr[] = {1,2,3,4,5};
problem is that you cannot use a <brace-enclosed initializer list> to initialize an array only while declaration.
either you initialise it in same line or use loop