CMSC 104 - Quiz 5

Total of 35 points possible - possible point totals for each question are shown as (X) below

  1. (5) True/False: An array of size 5 has indicies 1 through 5.
  2. (5) True/False: The lack of a null character is what makes a character array different than a string.
  3. (5) Write a statement that will declare a string that contains the word: "Hello"
  4. (5) What is contained inside of argc ?
  5. (15) What is the output of the following program when executed as follows:

    a.out hello world 1 2 3

    #include <stdio.h>
    int main(int argc, char** argv)
    {

    int x;

    for(x = 0; x < argc; x++){

    printf("%s\n",argv[x]);

    }

    return 0;
    }