#include<stdio.h>
void incriypt(char *s);
void decrypt(char *s);
int main()
{
char s[]="hello";
char (*incr)();
incr=incriypt;
incr(s);
printf("--------------------\n");
printf("incrypt=%s\n",s);
incr=decrypt;
incr(s);
printf("--------------------\n");
printf("incrypt=%s\n",s);
system("pause");
return 0;
}
void incriypt(char *s)
{
while(*s)
{
*s=*s+2;
s++;
}
}
void decrypt(char *s)
{
while(*s)
{
*s=*s-2;
s++;
}
FILE * pFile;
char mystring [100];
pFile = fopen ("C:\\Documents and Settings\\All Users\\Documents" , "r");
if (pFile == NULL) perror ("Error opening file");
else {
if ( fgets (mystring , 100 , pFile) != NULL )
puts (mystring);
fclose (pFile);
}
system("pause");
return 0;
}
void incriypt(char *s);
void decrypt(char *s);
int main()
{
char s[]="hello";
char (*incr)();
incr=incriypt;
incr(s);
printf("--------------------\n");
printf("incrypt=%s\n",s);
incr=decrypt;
incr(s);
printf("--------------------\n");
printf("incrypt=%s\n",s);
system("pause");
return 0;
}
void incriypt(char *s)
{
while(*s)
{
*s=*s+2;
s++;
}
}
void decrypt(char *s)
{
while(*s)
{
*s=*s-2;
s++;
}
FILE * pFile;
char mystring [100];
pFile = fopen ("C:\\Documents and Settings\\All Users\\Documents" , "r");
if (pFile == NULL) perror ("Error opening file");
else {
if ( fgets (mystring , 100 , pFile) != NULL )
puts (mystring);
fclose (pFile);
}
system("pause");
return 0;
}