I am writing program in which the first argument must be char
type and the second one an int
. I already wrote the code for the int
type but can't make it for the char
. I have searched everywhere, but I cannot find an answer to my problem, here is the code:
int main(int argc, char *argv[]){
if(argc != 3){
puts("Error: Invalid number of arguments\n");
exit(0);
}
if(argv[1] ??){
puts("Error: First argument not a char type\n");
exit(0);
}
}