#1
by 4キル » 4年前
以下の実行ファイルについて詳しい説明がほしいです。
これらを実行すると、Meiji university と表示されるのですが、なぜそうなるのかがわからない状態です。
#include<stdio.h>
int main(void)
{
char str1[] = "Rjnon%Zsn{jwxny~";
int str2[] = {77, 101, 105, 106, 105, 32, 85, 110, 105, 118, 101, 114, 115, 105, 116, 121, 0};
int i=0;
while(str1){
putchar(str1[i++]-5);
}
printf("\n");
i=0;
while(str2){
putchar(str2[i++]);
}
}
以下の実行ファイルについて詳しい説明がほしいです。
これらを実行すると、Meiji university と表示されるのですが、なぜそうなるのかがわからない状態です。
#include<stdio.h>
int main(void)
{
char str1[] = "Rjnon%Zsn{jwxny~";
int str2[] = {77, 101, 105, 106, 105, 32, 85, 110, 105, 118, 101, 114, 115, 105, 116, 121, 0};
int i=0;
while(str1[i]){
putchar(str1[i++]-5);
}
printf("\n");
i=0;
while(str2[i]){
putchar(str2[i++]);
}
}