Answer to Question #329331 in C for kit

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.
1
Expert's answer
2022-04-16T11:42:03-0400
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS