Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(int argc, char const *argv[])
- {
- int k=3;
- int i=0;
- char values[] = "abcdefghijklmnopqrstuvwxyz";
- char word[] = "word";
- char find = word[i];
- const char *ptr = strchr(values, find);
- if(ptr)
- {
- int index = ptr - values;
- while(i<5)
- {
- char find = word[i];
- i++;
- printf("%c", values[index+k] );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement