Add TD7
This commit is contained in:
parent
4296f3a394
commit
553cdc440c
24 changed files with 919 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue