Determine if a string contains only alphanumeric characters (or a space) December 5, 2023 by Tarik Looks good to me, but you can use isalnum(c) instead of isalpha and isdigit.