#include <stdio.h>
#include <conio.h>
int argc;
char *argv[];
{
FILE *fp;
int i;
char word[15];
fp = fopen(argv[1], "w");
printf("\nNo. of arguments in Command line = %d\n\n",argc);
for(i = 2; i < argc; i++)
fclose(fp);
printf("Contents of %s file\n\n", argv[1]);
Writing Content Of The File To Screen
printf("Contents of %s file\n\n", argv[1]);
fp = fopen(argv[1], "r");
for(i = 2; i < argc; i++)
{
printf("%s ", word);
}
}
fclose(fp);
printf("\n\n");
Writing the Arguments From Memory
for(i = 0; i < argc; i++)
getch();
}
}
No comments:
Post a Comment