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> | |
| /* | |
| itob(n,s,b) converts the integer n into a base | |
| b character representation in the string s. | |
| b could be up to 36. after that we run out of letters. | |
| */ | |
| void itob(int n, char h[], int b); | |
| void reverse(char s[], int len); |
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 <string.h> | |
| #include <stdio.h> | |
| #include <limits.h> | |
| /* | |
| code is from the book, i only added minimal witdth -- w | |
| */ | |
| void itoa(int n, char s[], int w); |
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> | |
| #include <string.h> | |
| /* | |
| code is from the book i only modified strindex, | |
| which now returns rightmost occurrence of t in s | |
| */ | |
| #define MAXLINE 1000 |
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> | |
| #include <math.h> | |
| #include <ctype.h> | |
| /* | |
| code is from the book, i changed atof function to | |
| make it handle scientific notations like : | |
| "123.45e-6" | |
| */ |
OlderNewer