bash-4.3$ date Mon Mar 27 12:59:03 EDT 2017 bash-4.3$ pwd /home/accts/sbs5/cs223/www/current/lectures bash-4.3$ cd code bash-4.3$ cat lp0327.c // logical problem // lp0327.c #include char *f(){ char result[80]; sprintf(result,"anything will do"); return(result); } int main(int argc, char **argv){ char *p; p = f(); printf("f() returns: %s\n",p); } bash-4.3$ ./lp0327 bash: ./lp0327: No such file or directory bash-4.3$ make lp0327 gcc -g3 -std=gnu99 -pedantic -Wall -lm lp0327.c -o lp0327 lp0327.c: In function ‘f’: lp0327.c:8:9: warning: function returns address of local variable [-Wreturn-local-addr] return(result); ^ bash-4.3$ ./lp0327 f() returns: (null) bash-4.3$ cd bash-4.3$ cd cs223/hw5 bash-4.3$ ls al10.html btree.o btreetest.c test1 alic10.html btreetest btreetest.c~ test2 alice10.html btreetestargs Cloudavlx test3 alice.html btreetestargs.c Cloudx Tests alice.txt btreetestargs.c~ Makefile xxx.html btree.h btreetestargs.o test bash-4.3$ ./Cloudx < test1 The Word Cloud: [0] country [5] [1] their [5] [2] of [5] [3] aid [5] [4] come [5] [5] men [5] [6] good [5] [7] for [5] [8] to [10] [9] the [9] bash-4.3$ ./Cloudx -debug < test1 Input: now is the time for all good men to come to the aid of their country Input: now is the time for all good men to come to the aid of their country Input: now is the time for all good men to come to the aid of their country Input: NOW is THE time For all good men to come to the aid of their country Input: NOW1 is, THE. time* For (all) 123 good men to come to the aid of their country Tree height: 6 Tree size: 15 The Word Cloud: [0] country [5] [1] their [5] [2] of [5] [3] aid [5] [4] come [5] [5] men [5] [6] good [5] [7] for [5] [8] to [10] [9] the [9] bash-4.3$ ./Cloudavlx -debug -avl < test1 Input: now is the time for all good men to come to the aid of their country Input: now is the time for all good men to come to the aid of their country Input: now is the time for all good men to come to the aid of their country Input: NOW is THE time For all good men to come to the aid of their country Input: NOW1 is, THE. time* For (all) 123 good men to come to the aid of their country Tree height: 6 Tree size: 15 The Word Cloud: [0] country [5] [1] their [5] [2] of [5] [3] aid [5] [4] come [5] [5] men [5] [6] good [5] [7] for [5] [8] to [10] [9] the [9] bash-4.3$ ./Cloudavlx -debug -avl < test1 Input: now is the time for all good men to come to the aid of their country Input: now is the time for all good men to come to the aid of their country Input: now is the time for all good men to come to the aid of their country Input: NOW is THE time For all good men to come to the aid of their country Input: NOW1 is, THE. time* For (all) 123 good men to come to the aid of their country Tree height: 4 Tree size: 14 aid Height: 0 Size: 1 Count: 5 (0x1aa2c50) all Height: 2 Size: 4 Count: 4 (0x1aa2a70) come Height: 1 Size: 2 Count: 5 (0x1aa2bf0) country Height: 0 Size: 1 Count: 5 (0x1aa2d70) for Height: 3 Size: 8 Count: 5 (0x1aa2a10) good Height: 0 Size: 1 Count: 5 (0x1aa2ad0) is Height: 1 Size: 3 Count: 4 (0x1aa28f0) men Height: 0 Size: 1 Count: 5 (0x1aa2b30) now Height: 4 Size: 14 Count: 4 (0x1aa2890) of Height: 0 Size: 1 Count: 5 (0x1aa2cb0) the Height: 1 Size: 3 Count: 9 (0x1aa2950) their Height: 0 Size: 1 Count: 5 (0x1aa2d10) time Height: 2 Size: 5 Count: 4 (0x1aa29b0) to Height: 0 Size: 1 Count: 10 (0x1aa2b90) The Word Cloud: [0] country [5] [1] their [5] [2] of [5] [3] aid [5] [4] come [5] [5] men [5] [6] good [5] [7] for [5] [8] to [10] [9] the [9] bash-4.3$ ./Cloudavlx -debug -avl this is a test this is a test this is a test Input: this is a test this is a test this is a test Tree height: 2 Tree size: 4 a Height: 0 Size: 1 Count: 3 (0x8e2d60) is Height: 2 Size: 4 Count: 3 (0x8e2d00) test Height: 0 Size: 1 Count: 3 (0x8e2dc0) this Height: 1 Size: 2 Count: 3 (0x8e2ca0) No word seen 5 times. bash-4.3$ exit Process shell finished