Hi I'm new to C and I am trying to print an 8 when running the program with "factorial 8". Instead of getting an 8, I am getting 56. Can anyone explain why?
#include <stdio.h>
int main(int argc, char **argv)
{
int input;
if(argv[1] == NULL)
{
printf("Error: please supply an integer on the command line.\n");
return 0;
}
input = *argv[1];
printf("%d", input);
return 0;
}