Question: Write a function called reverseInt which takes one integer parameter and changes the value of this integer parameter to the reverse of the integer. trace
Write a function called reverseInt which takes one integer parameter and changes the value of this integer parameter to the reverse of the integer. trace void function1(int& i, int j){ //What have been passed into these parameters? if ( i % 3 == 0 || i % 4 != 0 ) i = 5; //What does this line mean? Is i changed? Does it affect any other variables? else i = 2; // Is i changed here? Does it affect any other variables? j = 10; //Does this line affect any other variable besides j? } int main (){ int x = 0, y = 0; while (x <= 10) x += 10; //what does this loop do? What happen to x? cout << x << " " << y << endl; //What is the output of this line? function1(x, y); //What is this line? cout << x << " " << y << endl; //What is the output? return 0; } Recursive Functions: 1.Write a recursive function countEven that returns the count of even digits in the integer parameter. 2.Write a recursive function removeEven that returns a new number with all the even digits removed from the integer parameter. 3.Write a recursive function hasEven that returns true if the integer parameter contains an even digit, false otherwise. Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
