I have the below part of code in which I noticed that if I change the 0 to 1 the result is the same. I get the STACKprint();
with "on" as the second argument, nothing with anything else and if there is no argument I get a segmentation fault. I guess for the segmentation fault I need to check if the argument is NULL
but I am not sure how to do that with the second parameter and it really bugs me out why (strcmp (argv[2],"on") == 1)
has no effect. Is it not supposed to take a TRUE value?
if (strcmp (argv[2],"on") == 0) {
STACKprint();
printf("\n");
}