Annotation of 43BSDReno/usr.bin/learn/learnlib/C/L11.2a, revision 1.1.1.1

1.1       root        1: #print
                      2: With your 'cc' command you can give the name of
                      3: an object file to be loaded with your program.
                      4: For example
                      5:    cc x.c y.o
                      6: will load the previously compiled program 'y' along with
                      7: the program 'x' to be compiled now.
                      8: There is a file in this directory named "getnum.o"
                      9: that contains a subroutine "getnum" that will read digits
                     10: from the standard input, convert them to binary, and
                     11: return an integer value.
                     12: 
                     13: Write a program which reads an integer and prints
                     14: it back in octal.  Compile and test as usual.
                     15: #once #create Ref
                     16: 254
                     17: #once cp %s/getnum.o .
                     18: #user
                     19: a.out <Ref >test
                     20: grep 376 test >/dev/null
                     21: #succeed
                     22: /*     One way: */
                     23: 
                     24: main() {
                     25:        printf("%o\n", getnum());
                     26: }
                     27: #log
                     28: #next
                     29: 11.1a 10

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.