Question #329331

  1. Your task is to implement the function definition of the cheerUp() function. The cheerUp() function should update the values passed by multiplying each of them by 3.

Expert's answer

#include <stdio.h>

void cheerUp(int *a)
{
  *a = (*a) * 3;
}

int main() {
    int num;
       printf("Enter value: ");
       scanf("%d", &num);
       cheerUp(&num);
    printf("value * 3 = %d", num);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS