in the picture, there is a shot of 3 dragon ball characters and how their power
ID: 3814349 • Letter: I
Question
in the picture, there is a shot of 3 dragon ball characters and how their power levels changed over time.
Please, create a script that will generate similar output by using “SWAP with function” and“SWAP with Pointer”.
c programming
CAUsersjeongiDesktoplGoku2.exe Before the Neme kian Saga, Frieza's power levels was 530K Uegeta's power levels was 20K and SonGoku's, power levels was 8K without Kaioken After the awakening of Songoku's true power Frieza's power level i now 3000K Vegeta' s power level is now 2000K Son Goku' s power level is now 10000KExplanation / Answer
#include<stdio.h>
void swap(int *num1, int *num2) {
int temp;
temp = *num1;
*num1 = *num2;
*num2 = temp;
}
int main() {
int num1, num2;
printf(" Enter the first number : ");
scanf("%d", &num1);
printf(" Enter the Second number : ");
scanf("%d", &num2);
swap(&num1, &num2);
printf(" First number : %d", num1);
printf(" Second number : %d", num2);
return (0);
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.