This commit is contained in:
Yorick Barbanneau 2023-04-17 23:40:08 +02:00
parent 4296f3a394
commit 553cdc440c
24 changed files with 919 additions and 0 deletions

View file

@ -0,0 +1,11 @@
#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");
}
}