I am working out a small program... wherein i provide the command line argments `
For e.g. ./a.out 2 3 4 + *
when it comes ' * ', rather than printing the ' * ' itself, it prints the folders inside the directory,,, ' + ' works fine..... Please let me know how to remove this error..... I want to print ' * ' here........
#include <stdio.h>
int main(int argc, char *argv[])
{
char *c;
while(--argc > 0)
{
c = *++argv;
if(strcmp(c,"+") == 0 )
{
printf("%s",c);
}
else if(strcmp(c,"-") == 0)
{
printf("%s",c);
}
else if(c[0] == '*')
{
printf("%s",c);
}
}
}