myparallel

myparallel - Script started on Wed Mar 16 16:21:37 2005...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Script started on Wed Mar 16 16:21:37 2005 %cat parallel.c #include <stdio.h> void readem (int pointsary [],int idary[], int *num_players,float *avg); void printem (int pointsary [],int idary[], int num_players, float avg); /* the function prototypes are named above. Notice that the number of elements in the array are not given in the prototype. Arrays are ALWAYS passed by reference. Function readem, determines the number of players who played, fills the array, and determines the average for the team. Function Printem prints outeach player, the number of points he scored and the difference from average. */ int main (void) { int pointsary [5]; int num_players; int idary[5]; /* The above declares pointsary to be an integer array containing up to 10 elements */ float avg; readem (pointsary,idary, &num_players, &avg); /* function readem receives the array, arrays are always passed by reference. It also fills the array, determines the number of players, and
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/01/2011 for the course CSC 1253 taught by Professor Staff during the Fall '08 term at LSU.

Page1 / 3

myparallel - Script started on Wed Mar 16 16:21:37 2005...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online