Sams Teach Yourself C in 21 Days

(singke) #1

  1. Continuing with the array declared in question 3, what does the expression
    array[0][0]mean?

  2. Again using the array from question 3, which of the following comparisons is true?
    array[0][0] == &array[0][0][0];
    array[0][1] == array[0][0][1];
    array[0][1] == &array[0][1][0];

  3. Write the prototype for a function that takes an array of pointers to type charas its
    one argument and returns void.

  4. How would the function that you wrote a prototype for in question 6 know how
    many elements are in the array of pointers passed to it?

  5. What is a pointer to a function?

  6. Write a declaration of a pointer to a function that returns a type charand takes an
    array of pointers to type charas an argument.

  7. You might have answered question 9 with
    char ptr(char x[]);
    What is wrong with this declaration?

  8. When defining a data structure to be used in a linked list, what is the one element
    that must be included?

  9. What does it mean if the head pointer is equal to NULL?

  10. How are single-linked lists connected?

  11. What do the following declare?
    a.int *var1;
    b.int var2;
    c.int **var3;

  12. What do the following declare?
    a.int a[3][12];
    b.int (b)[12];
    c.int
    c[12];

  13. What do the following declare?
    a.char z[10];
    b.char
    y(int field);
    c.char (*x)(int field);


436 Day 15

25 448201x-CH15 8/13/02 11:13 AM Page 436

Free download pdf