My coding looks like this
int main(int argc, char *argv[])/*command line input*/
{
int len;
char *t[10];
len=strlen(argv[argc-1]);
temp[0]=argv[argc-1]
if(strstr(t[0],"c"==NULL)/*to check for a c file input*/
printf("Not a c file");
else
printf("C file");
}
if my command line input in linux is ./a.out test.c
argv[0] contains ./a.out ans argv[1] contains test.c
my problem is to name a the output file as test.i. how to name a file with the same name as input file with .i extension