What is the output of the following C program?
[gamipress_button type=”submit” label=”Run Code Online” onclick=”window.open(‘https://coderseditor.com’,’_blank’)”]
#include <stdio.h> int main() { int arr[] = {}; printf("%d", sizeof(arr)); return 0; }
Studently Answered question October 10, 2022
Output: 0
arrays of size 0 are permitted in C (or C++). When an empty initialization list is used when declaring an array, the array’s size is set to 0.
Studently Answered question October 10, 2022