Advertisement
Guest User

strchr()

a guest
Dec 25th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <cs50.h>
  3. #include <string.h>
  4.  
  5. int main(void)
  6. {
  7. printf("What are the names of your pets? (Enter them by separating with commas)");
  8. string petNames = GetString();
  9. printf("%s\n", strchr(petNames, ','));
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement