Scores: a program to compute grade statistics. Enter all scores, finish with –1: 57 85 97 16 82 –1 Average: 61.4 Median: 82 Standard Deviation: 32.2 |
#include <stdio.h> int InputScores (double *); void PrintStats (double *, int); int main (void) { double scores[250]; int numScores; printf ("Scores: a program to compute grade statistics.\n"); printf ("Enter all scores, finish with –1:\n\n"); numScores = InputScores (scores); PrintStats (scores, numScores); } |
double scores[250]; |
int array [8] = {2, 4, 6, 8, 10, 12, 14, 16}; |
int array1 [8] = {2, 4, 6, 8, 10, 12, 14, 16}; int array2 [] = {2, 4, 6, 8, 10, 12, 14, 16}; |
int array [8] = {2, 4, 6, 8, 10, 12, 14, 16}; |
int array[] = {2, 4, 6, 8, 10, 12, 14, 16}; int i; for (i = 0; i < 8; ++i) printf("%d", array[i]); |
#include <stdio.h> int main (void) { int array [8] = {2, 4, 6, 8, 10, 12, 14, 16}; int *p1, *p2; p1 = array; p2 = &array[0]; printf ("%d %d\n", *p1, *p2); return 0; } |
double coordinate[3]; |
int frequency[26]; |
int *pointer[6]; |
int a[8]; |
double coord[3]; int frequency [26]; int *pointer [6]; |
printf ("(%f, %f, %f)\n", coor[0], coor[1], coor[2]); for (i=0; i<26; ++i) frequency[i] = 0; pointer[3] = &frequency[12]; |
int frequency [26]; int *pointer [6]; pointer[3] = &frequency[12]; pointer[2] = frequency; |
#include <stdio.h> int InputScores (double *); void PrintStats (double *, int); int main (void) { double scores[250]; int numScores; printf ("Scores: a program to compute grade statistics.\n"); printf ("Enter all scores, finish with –1:\n\n"); numScores = InputScores (scores); PrintStats (scores, numScores); } |
int InputScores (double *); |
int i; int *p = &i; |
int a[8]; |