Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
How do I make user input a set of text and using the text which has only alphabet letters how would I read the text and move each letter to the next changing the value of the text?
For example the letter a would change to b and b would change to c.
Posted
Updated 23-Nov-15 2:02am
v3
Comments
Suvendu Shekhar Giri 22-Nov-15 14:46pm    
this is not a question we are suppose to answer. we can help you if you have tried something and stuck somewhere. try to write the code yourself.
Patrice T 22-Nov-15 15:12pm    
This is your design !
ZurdoDev 23-Nov-15 8:32am    
Where are you stuck?

1 solution

C strings are character arrays. You might simple iterate over the array items, incrementing all of them, e.g.

C
#include <stdio.h>

int main()
{
  char s[] = "foo";
  char * p;

  for  ( p=s; *p; ++p )
    (*p)++;

  printf("%s\n", s);
  return 0;
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900