-
-
Save krha/1895489 to your computer and use it in GitHub Desktop.
odd static test in C
This file contains hidden or 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> | |
int good(int i) | |
{ | |
i++; | |
return i; | |
} | |
int not_good(int i) | |
{ | |
for (; i < 1000000;i++) | |
return i; | |
return 0; | |
} | |
int main() | |
{ | |
int index1 = 0, index2 = 0; | |
while (1){ | |
index1 = good(index1); | |
index2 = not_good(index2); | |
fprintf(stdout, "%d -- %d\n", index1, index2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment