fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. char *strShift(char *s) {
  6. int tam = strlen(s);
  7. char *nova = malloc(tam + 1);
  8. if (nova == NULL) return NULL;
  9. for (int i = 0; i < tam; i++) nova[i] = s[i] + 1;
  10. nova[tam] = '\0';
  11. return nova;
  12. }
  13.  
  14. int main(void) {
  15. printf("%s", strShift("anaz"));
  16. }
  17.  
  18. //https://pt.stackoverflow.com/q/448423/101
Success #stdin #stdout 0s 4200KB
stdin
Standard input is empty
stdout
bob{