Hey guys,
I am trying to get a array input with mix with letters and numbers(but with pattern) etc.Qb2Ke4Rh4Xd4
I know how to do the safe get for the string.
How do i get the array input?Code:void safegets (char s[], int arraySize) { int i = 0, maxIndex = arraySize - 1; char c; while (i < maxIndex && (c = getchar()) != NEWLINE) { s[i] = c; i = i + 1; } s[i] = NULL; }
or i can just use string and consider the number to be letter?
Is there any function to do so?
Thanks