Index of /cse121/lecture/week05

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [   ] argv.c 31-Jul-2008 16:52 364 [   ] hw4-3.c 29-Jul-2008 22:22 864 [   ] hw4-4.c 29-Jul-2008 22:20 924 [TXT] sample-test1.txt 28-Jul-2008 20:56 2.9K [   ] scanf-int.c 31-Jul-2008 22:14 888 [   ] string.c 31-Jul-2008 21:55 467 [   ] stringArray.c 31-Jul-2008 22:02 1.5K
Homework 4 notes:

Reading input from the keyboard and storing it in an array can be done 2 ways:

* Use scanf() with the address of each array element in a loop, such as:

      scanf("%f", &array[i]);

* Use a temporary variable (the same one in a loop) and write a second
  statement to assign the value to the array element in a loop:

      scanf("%f", &temp);
      array[i] = temp;