关于 printf 的问题。这里出现多对双引号,求指导。
程序代码:/*加密*/
#include<stdio.h>
#include<string.h> /*字符数组以0结尾*/
#define MAXLINE 100
void encrypt(char *);
int main()
{
char line[MAXLINE];
printf("Input the string:");
gets(line);
encrypt(line);
printf("%s%s\n","After being encrypted:",line);/*看这步。为什么有2个%s,一般输出一个不就行了吗。
还为什么有2对双引号,为什么输出的结果是After句子在前,字符串在后。*/
return 0;
}
void encrypt(char *s)
{
for(;*s!='\0';s++)
if(*s=='z') *s='a';
else *s=*s+1;
}


