-
Notifications
You must be signed in to change notification settings - Fork 0
/
temp.c
54 lines (52 loc) · 883 Bytes
/
temp.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <stdio.h>
#include <float.h>
#include <string.h>
int main(){
// printf("max float value = %f\n", FLT_MAX);
/*char *buf1 = "aaaa";
char *buf2 = "bbbb";
printf("Buf1 = %s Buf2 = %s\n", buf1, buf2);
char *temp = buf1;
buf1 = buf2;
buf2 = temp;
printf("Buf1 = %s Buf2 = %s\n", buf1, buf2);
printf("size of buf = %d\n", sizeof(buf1));*/
char* keywords[24] = {
"with",
"parameters",
"end",
"while",
"type",
"_main",
"global",
"parameter",
"list",
"input",
"output",
"int",
"real",
"endwhile",
"if",
"then",
"endif",
"read",
"write",
"return",
"call",
"record",
"endrecord",
"else"
};
unsigned long hash;
int c;
char *str = "123";
/*for (int i = 0; i < 24; i++)
{
hash = 5381;
while (c = *keywords[i]++)
hash = ((hash << 5) + hash) + c;
printf("sum = %d\n", (int)(hash%59));
}*/
printf("number = %d\n", (int)str);
return 0;
}