CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
C Quiz #4

Array and Sizeof

mediumArrays

What is the output of this code? (Assume int is 4 bytes)

📄 Code

1#include <stdio.h>
2 
3int main() {
4 int arr[] = {1, 2, 3, 4, 5};
5 printf("%lu\n", sizeof(arr) / sizeof(arr[0]));
6 return 0;
7}