What is the default value of elements in an array declared as int arr[5]; in C?
- 0
- 5
- Random integers
- Undefined
In C, when you declare an array without initializing it, all its elements are set to 0 by default. Hence, the correct answer is 0.
Loading...
Related Quiz
- What is a double pointer in C?
- In C, an array name acts as a ________ pointing to the first element of the array.
- In the context of bit fields, if the declared width is larger than the width of the specified type, the behavior is considered ________.
- In what scenario would using a nested structure be beneficial?
- To check for errors during file operations, you can use the ______ function.