I am trying to find a way to essentially say if argv[4] is nothing, in other words if there was not argv [4] given, then do so and so. this is what i have so far
Code:
#include<stdio.h>
#include <stdlib.h>
#include<string.h>
int main(int argc, char *argv[]){
if ((strcmp (argv[4], "dec") == 0 )|| (strcmp (argv[4], "????????") == 0))
printf("first times a charm\n");
return 0;
}
what do i put in for the ????? to say if there is no fourth argument do the printf
mind you i will have another if later on that states if argv[4] is anything other than dec, oct, or hex, or no argument at all print out an error
hope my jibberish is clear enough