Last active
June 1, 2016 23:11
-
-
Save gitpraetorianlabs/0b41ba8cdccb00789b1545d063819949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// What if.... | |
// This is to analyze how basic branching works on MIPS | |
// by b1ack0wl | |
int main(int argc, char **argv[]){ | |
if (argc < 2 ){ | |
printf("Usage: %s number", argv[0]); | |
return 1; | |
} | |
int a = atoi(argv[1]); // cast argv[1] as an integer | |
if (a < 5) { | |
printf("%i is less than 5", a); | |
} | |
else{ | |
printf("%i is greater than 5", a); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment