Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(int argc, char const *argv[])
  5. {
  6. int k=3;
  7. int i=0;
  8. char values[] = "abcdefghijklmnopqrstuvwxyz";
  9. char word[] = "word";
  10. char find = word[i];
  11.  
  12. const char *ptr = strchr(values, find);
  13. if(ptr)
  14. {
  15. int index = ptr - values;
  16. while(i<5)
  17. {
  18. char find = word[i];
  19. i++;
  20. printf("%c", values[index+k] );
  21. }
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement