How to find the first character in the string that matches any character in another string in C

1 Answer

0 votes
#include <stdio.h>
#include <string.h>

int main() {
    char s[] = "c c++ c# 930 java python";
    char *p = strpbrk(s, "0123456789");
    
    printf("%s\n", p);

    return 0;
}



/*
run:

930 java python

*/

 



answered Jan 5, 2021 by avibootz
...