11 lines
289 B
C
11 lines
289 B
C
#include <stdio.h>
|
|
int main(int argc, char *argv[]) {
|
|
argc--; // program name is not really an argument
|
|
|
|
// Extract bit 0 to check for parity of the number of arguments
|
|
if ((argc & 1) == 0) {
|
|
printf("even number of arguments\n");
|
|
} else {
|
|
printf("odd number of arguments\n");
|
|
}
|
|
}
|