I want to have \0 as one of my array (char type) element in my C/C++ code but not the last one.
I am doing this.
char arr[10] ; //array declaration
//initializing the array
arr[0] = 'a' ;
arr[1] = '\0' ;
arr[2] = 's' ;
When i try printing these array elements, i get some symbolic stuff as output for a[1].
I guess 0 is converted to char. Is that so ?
If yes, can't i have \0 anyhow in my array before the termination ?
chararray.