Write a prototype for a function sumnavg that has three type
Solution
1.
void sum_n_avg(double x,double y,double z,double *sum,double *avg);
pointers *sum and *avg can be used as output parameters.
2.
#include <stdio.h>
int check(int num, int *multiple7 ,int *multiple11 ,int *multiple13)   
 {
   
    if(num % 7 == 0) //check if dividing number by 7 results in 0 remainder ,multiple of 7
        *multiple7 = 1;
    else
    *multiple7 = 0;
   
   
   
    if(num % 11 == 0) //check if number is multiple of 11
        *multiple11 = 1;
    else
    *multiple11 = 0;
   
   
    if(num % 13 == 0) //check if number is multiple of 13
        *multiple13 = 1;
    else
    *multiple13 = 0;
   
    if(num < 0) //check if number is negative,positive or 0 return the approriate values
    return -1;
    else if(num == 0)
    return 0;
    else if(num > 0)
    return 1;
   
 }
 int main()
 {
    int number,multiple7,multiple11,multiple13,sign;
   
 printf(\"Enter the number to check\");
    scanf(\"%d\",&number);
   
    sign = check(104,&multiple7,&multiple11,&multiple13); //function call
   
    if(sign == -1) //display if number is negative,positive or 0
    printf(\"\ The number is negative\");
    else if(sign == 0)
    printf(\"\ The number is 0\");
    else if(sign ==1)
    printf(\"\ The number is positive\");
   
    if(multiple7 == 1) //displays if number is multiple of 7,11 or 13
    printf(\" and is multiple of 7\");
    if(multiple11 == 1)
    printf(\" and is multiple of 11\");
    if(multiple13 == 1)
    printf(\" and is multiple of 13\");
    return 0;
 }
output:
3.
x3 is ordinary variable name but x[3] is an array element at index 3. x[3] is part of array x [];


