Home » Archimedes archive » Archimedes World » AW-1991-08.adf » August91 » !AWAug91/Goodies/C/!Words/work/c/words

!AWAug91/Goodies/C/!Words/work/c/words

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1991-08.adf » August91
Filename: !AWAug91/Goodies/C/!Words/work/c/words
Read OK:
File size: 0146 bytes
Load address: 0000
Exec address: 0000
File contents
/*  Program: !Words                       */
/*  Archimedes World, August 1991.        */

#include "lexical.h"
#include <stdio.h>

#define STRLEN 16

int main( void )
{
    char word[STRLEN];

    printf( "Please enter a word: " );

    gets( word );

    ToUpperCase( word );

    printf( "You entered %s.  ", word );
}




00000000  2f 2a 20 20 50 72 6f 67  72 61 6d 3a 20 21 57 6f  |/*  Program: !Wo|
00000010  72 64 73 20 20 20 20 20  20 20 20 20 20 20 20 20  |rds             |
00000020  20 20 20 20 20 20 20 20  20 20 2a 2f 0a 2f 2a 20  |          */./* |
00000030  20 41 72 63 68 69 6d 65  64 65 73 20 57 6f 72 6c  | Archimedes Worl|
00000040  64 2c 20 41 75 67 75 73  74 20 31 39 39 31 2e 20  |d, August 1991. |
00000050  20 20 20 20 20 20 20 2a  2f 0a 0a 23 69 6e 63 6c  |       */..#incl|
00000060  75 64 65 20 22 6c 65 78  69 63 61 6c 2e 68 22 0a  |ude "lexical.h".|
00000070  23 69 6e 63 6c 75 64 65  20 3c 73 74 64 69 6f 2e  |#include <stdio.|
00000080  68 3e 0a 0a 23 64 65 66  69 6e 65 20 53 54 52 4c  |h>..#define STRL|
00000090  45 4e 20 31 36 0a 0a 69  6e 74 20 6d 61 69 6e 28  |EN 16..int main(|
000000a0  20 76 6f 69 64 20 29 0a  7b 0a 20 20 20 20 63 68  | void ).{.    ch|
000000b0  61 72 20 77 6f 72 64 5b  53 54 52 4c 45 4e 5d 3b  |ar word[STRLEN];|
000000c0  0a 0a 20 20 20 20 70 72  69 6e 74 66 28 20 22 50  |..    printf( "P|
000000d0  6c 65 61 73 65 20 65 6e  74 65 72 20 61 20 77 6f  |lease enter a wo|
000000e0  72 64 3a 20 22 20 29 3b  0a 0a 20 20 20 20 67 65  |rd: " );..    ge|
000000f0  74 73 28 20 77 6f 72 64  20 29 3b 0a 0a 20 20 20  |ts( word );..   |
00000100  20 54 6f 55 70 70 65 72  43 61 73 65 28 20 77 6f  | ToUpperCase( wo|
00000110  72 64 20 29 3b 0a 0a 20  20 20 20 70 72 69 6e 74  |rd );..    print|
00000120  66 28 20 22 59 6f 75 20  65 6e 74 65 72 65 64 20  |f( "You entered |
00000130  25 73 2e 20 20 22 2c 20  77 6f 72 64 20 29 3b 0a  |%s.  ", word );.|
00000140  7d 0a 0a 0a 0a 0a                                 |}.....|
00000146