Question: For the following code: 1 2 3 4 5 int myFunction ( int n ) { int x = n * 2 ;

For the following code:

12345

int myFunction(int n) {

int x = n * 2;

int y = (+ 1) % 3;

return y - x;

}

What does myFunction(5) evaluate to?

 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The function myFunction takes an integer n as input I... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!