RE: Why don't we add null pointer at the end of array...
NULL is never added to any array since NULL is a pointer value. Typically it is
#define NULL (void*(0))
THere is no way to get the size of an array unless it is statically allocated and the header that includes it defines the size or it is in the same module.
HEADER.H
extern int a[];
CCODE.C
int n = sizeof(a); // Returns n = 4 (pointer size)
RE: Why don't we add null pointer at the end of array...
Null Pointer is used for the recogniation of the strings. But to calculate the length of the integer array, simpaly we can use a clunter while inserting the value to the array and we can calculate the lenght.