fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void f(char *str) {
  5. for (int i = 0; str[i] != '\0'; i++) {
  6. if (str[i] > 64 && str[i] <= 90) { // A-Z の範囲
  7. str[i] = ((str[i] - 65 + 13 + i) % 26) + 65;
  8. }
  9. }
  10. }
  11.  
  12. int main() {
  13. int a = 1197424961;
  14. int b = 4672071;
  15. char *str = (char *)&a; // aとbのメモリ領域を文字列として扱う
  16.  
  17. f(str);
  18. printf("Alpaca{%s}\n", str);
  19. return 0;
  20. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Alpaca{NO_W}