In-Class Practice

Variable Parameter Lists



Design and code a function named list that receives an int and a list of integer values and displays the list of values in tabular form.  The first parameter holds the number of integer values supplied.  When used with the following program, your function displays the output on the right


 /* Variable Parameter Lists - Handout 
  * list.c
  * May 28 2007
  */

 #include <stdio.h>


 void list(                );

 int main (void) {

     list(6, 1, 2, 3, 4, 5, 8); 
     list(3, 7, 8, 9); 

     return 0;
 }

 void list(               ) {










 }











  List of Values:
  1: 1
  2: 2
  3: 3
  4: 4
  5: 5
  6: 8
  List of Values:
  1: 7
  2: 8
  3: 9









 




   Printer Friendly Version of this Page print this page     Top  Go Back to the Top of this Page



  Designed by Chris Szalwinski   Copying From This Site