13. Let the function fun be defined as
int fun(int *k) cfw_
*k += 4;
return 3 * (*k) - 1;
Suppose fun is used in a program as follows:
void main() cfw_
int i = 10, j = 10, sum1, sum2;
sum1 = (i / 2) + fun(&i);
sum2 = fun(&j) + (j / 2);
What are the valu

1) Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree: Example
Problem Description:
We have to provide a UNIQUE list of leaves of the tree. We have given a Binary tree represented as a
list. So, we need to flatten the l

9. Assume the following rules of associativity and precedence for expressions:
Precedence Highest *, /, not
+, , &, mod
(unary)
=, /=, < , <=, >=, >
and
Lowest or, xor
Associativity Left to right
Show the order of evaluation of the following expressions

20. Consider the following C program:
int fun(int *i) cfw_
*i += 5;
return 4;
void main() cfw_
int x = 3;
x = x + fun(&x);
What is the value of x after the assignment statement in main, assuming
a. operands are evaluated left to right.
b. operands are e

The following example program, written with the syntax of JavaScript,
illustrates these choices:
function sub1() cfw_
var x;
function sub2() cfw_
alert(x); / Creates a dialog box with the value of x
;
function sub3() cfw_
var x;
x = 3;
sub4(sub2);
;
funct