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
| /* | |
| * Attempt to find fixed points of a particularly interesting function. | |
| * | |
| * Kaprekar's function sorts the digits of n ascending and descending, then | |
| * returns the descending minus the ascending. The fixed points of this | |
| * function, as well as the attractor classes are very interesting. | |
| */ | |
| #include<stdio.h> | |
| #include<limits.h> |
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<stdlib.h> | |
| #include<stdio.h> | |
| int main(int argv, char* argc[]) { | |
| void** loop = malloc(sizeof(void**)); | |
| *loop = (void*) loop; | |
| printf("loop: %p, *loop: %p\n", loop, *loop); | |
| free(loop); |
OlderNewer