#include <stdio.h>
#include <string.h>
void fun(char *arr)
{
int i;
unsigned int n = strlen(arr);
printf("n = %d\n", n);
for (i=0; i<n; i++)
printf("%c ", arr[i]);
}
// Driver program
int main()
{
char arr[] = {'s', 'i', 'd', 'd', 'i', 's', 's', 'i', 'd'};
fun(arr);
return 0;
}
out put of the following code ?
answer given n=11
siddissidj@
doubt why strlen is 11 , is it not 9 ? which 2 character are extra ....
someone give detail explaination