summaryrefslogtreecommitdiff
path: root/05/main.c
diff options
context:
space:
mode:
Diffstat (limited to '05/main.c')
-rw-r--r--05/main.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/05/main.c b/05/main.c
index 2dc7b81..0c991b7 100644
--- a/05/main.c
+++ b/05/main.c
@@ -4,30 +4,12 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
-
-int compar(const void *a, const void *b) {
- int i = *(int *)a;
- int j = *(int *)b;
- if (i < j) return -1;
- if (i > j) return 1;
- return 0;
-}
+#include <time.h>
+#include <float.h>
int main(int argc, char **argv) {
- char buf[36];
- strcpy(buf, "Hello there there!");
-/* buf[36]='b'; */
- printf("%s\n",strstr(buf," ther"));
-
- static char str[] = "?a???b,,,#c";
- char *t;
-
- printf("%s\n", strtok(str, "?")); /* t points to the token "a" */
- printf("%s\n", strtok(NULL, ","));
- printf("%s\n", strtok(NULL, "#,"));
- printf("%s\n", strtok(NULL, "?"));
-
-
+ srand(time(NULL));
+ printf("%d\n",rand());
return 0;
}