- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
strpbrk() in C
The function strpbrk() is used to find the first character of first string and matches it to any character of second string. It returns NULL, if no matches are found otherwise, it returns a pointer to the character of first string that matches to the character of second string.
Here is the syntax of strpbrk() in C language,
char *strpbrk(const char *string1, const char *string2)
Here is an example of strpbrk() in C language,
Example
#include <stdio.h> #include <string.h> int main () { const char s1[] = "Helloworld"; const char s2[] = "Blank"; char *result; result = strpbrk(s1, s2); printf("The matching character : %c
", *result); return(0); }
Output
The matching character : l
Advertisements
To Continue Learning Please Login
Login with Google