Advertisement
Guest User

Untitled

a guest
May 30th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. // This code outputs: h is in "This is my test string"
  5. int main(int argc, char* argv[])
  6. {
  7.    const char *zborZaProverka= "nino";
  8.    char *recenica = "jas se vikam nino no me vikaat pederche";
  9.    char *c = recenica;
  10.    while (*c)
  11.    {
  12.        if (strchr(zborZaProverka, *c))
  13.        {
  14.           printf("%c is in \"%s\"\n", *c, recenica);
  15.        }
  16.  
  17.        c++;
  18.    }
  19.  
  20.    return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement