#include <stdio.h>
#include <conio.h>
int main() {
int arr[] = {1,2,3};
arr[3] = 4;
printf("%d", sizeof(arr) / sizeof(1)); // To print the length of arr
getch();
return 0;
}
I first created this array of length 3 and then at index 3 I put 4 as its value. So the length should be 4 now, but still, after compiling it is printing 3. Why?