Differentiate between character array and integer array with respect to size and initialisation.
Parameter
|
Character Array
|
Integer Array
|
Size
|
Last location in character array is filled with '\0' so the array size should be so declared that it should have one last location for '\0' character.
|
No extra location than the number of elements is required.
|
Initialization
|
Initialization can be done like : char str[4]={'a','b','c','\0'}; char str[4]="abc";
|
Initialization can be done like : int arr[4]={1,2,3,4};
|