This is if I get right that you wanna see explicid char in string!
This is how you can make that happen!
I hope that this code will help you, and is something near what you looking for!
Code:
#include <stdio.h>
int main ( void )
{
char *month[6] = { "INVALID", "JAN", "FEB", "MAR", "MAY", "JUNE"};
int i, j, k = 0; char c;
for ( i = 0; i < 6; ++i )
{
printf ( "month[%d] = ..%s..n", i, month [ i ] );
for ( j = 0; month [i][j]; ++j )
{
printf ( "month[%d][%d] = '%c'\n", i, j, month[i][j] );
}
}
printf("\nIn what string you want char?:");
scanf("%d", &i);
j = 0;
while(month[ i ][ j ] != '\0') { k++; j++; }
printf("\nYour string has =.. %d .. char\n", k);
printf("\nOn what place you wanna see char ?= ");
scanf("%d", &j);
printf("\n%c\n", month[i][j - 1]);
printf("\nIn ..%s.. for what char you wanna search ?= ", month[i]);
scanf(" %c", &c);
j = 0;
while(month[i][j] != '\0')
{
if( month[i][j] == c)
{
printf("\n char ..%c.. found in month[%d][%d]", c, i, j);
}
j++;
}
printf("\n");
system("PAUSE");
return 0;
}
---------------------------
Sorry for spelling errors, not English.
Rugby Is Life!