Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
#include <stdio.h>
void square(int x, int *result) {
*result = x * x;
}
int main() {
int a = 5;
printf("before: %d\n", a); // 5
square(10, &a);
printf("after: %d\n", a); // 100
return 0;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question