put code inside [ code] [/ code] tages (without the space inside) to make it look preety.
int n , i , count;
printf( "Enter the no of the characters in the array\n" );
scanf( "%d" , &n );
printf("Enter the characters into the array\n" );
for( i = 0 ; i < n ; i++ )
scanf( "%c" , &a[i] );
printf( "Enter the character u want to search\n" );
printf("%d's occurence at %d\n",count,i);
Now.. that helps
Ok.. so 2nd of all, whenever you have a code problem, please.. please
tell people specifically what's worng.
"Umm.. it doesn't work" helps noone.
"It doesn't access a certain index of an arry with input blah" helps everyone greately
So.. tell us what's wrong? I see a few obvious parts.. but tell us your take?
Oh.. and use gdb. Install it.. love it