Computer Science, asked by ritamsaha1001, 5 months ago

int myFunction(int n) {
int x = n * 2;
int y = (x + 1) % 3;
return y - x;
}
my function(5)?

Answers

Answered by shashidubey1119
0

Answer:

 function, int myFunction(int n),

If n = 5, it evaluates to -8, as,

> x = n * 2

> x = 5 * 2

> x = 10

> y = (x + 1) % 3

> y = (10 + 1) % 3

> y = 11 % 3

> y = 2

Similar questions