CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

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

Topics

Array and Sizeof

C quiz · Question 4
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}