Software 1 - standard library, bases, getchar, getline (3)


administrivia

Web Page - http://www.cs.tau.ac.il/~efif/courses/Software1_Spring_04


Lab session summary


Some standard math functions


Some standard character handling functions


Basic Conversions

  • Number of digits
    digits
  • Digit d of number x in base B
    digit
  • Conversion from basis B to basis 10 and vice versa
    conversion
  • Number: Radix: Number:

    Input and Output


    getchar


    getchar example


    getchar return type


    EOF


    Terminating a program


    Shorter getchar example


    getline


    Shell prompt


    Capitalizing first character


    Changing the csh prompt


    Assignment 1

  • Place the source files under the directory ~/software1/assign1/
  • Exactly the required files: get_digit.c dec2eng.c eng2dec.c maxbin2eng.c e.c
  • Set the right permissions
    chmod 705 ~ ~/software1 ~/software1/assign1 ~/software1/assign1/*
    
  • Test cases
  • Grading and feedback

    practices prev top next


    Maintained by Efi Fogel. Last modified: May 24 2004.