23 lines
496 B
C
23 lines
496 B
C
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main() {
|
||
|
char * name = "nigger";
|
||
|
int age = 28;
|
||
|
printf("%s, is you\n",name);
|
||
|
|
||
|
//use strncmp function from string.h to compare strings
|
||
|
//the number 3 is the length of fag
|
||
|
if ( strncmp(name, "fag", 3) == 0 ) {
|
||
|
printf("This fag is identified and is %d\n", age);
|
||
|
}
|
||
|
else if (strncmp(name, "nigger", 6) == 0){
|
||
|
printf("you are a %s\n", name);
|
||
|
}
|
||
|
else {
|
||
|
printf("I don't know you\n");
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|