DATA STRUCTURE Programming and Technical Programming Technical

Given Integer x = 40, y = 35, z = 20, w = 10
Comment on the output of the following two statements
print x * y / z - w print x * y / (z - w)

Read Solution (Total 10)

DATA STRUCTURE Other Question

Consider the following code:
function modify(w,u)
{
w = w + 2
u = u - 3
return (w - u)
}
function calculate( )
{
integer a = 10, b = 20, c
c = modify(a, b);
print a
print space
print b
}
Assume that a was passed by value and b was passed by reference. What will be the
output of the program on executing function calculate( ) ?

Op 1: 12 17
Op 2: 10 17
Op 3: 12 20
Op 4: 10 20
logic to expand series upto n

1, 1, 2, 10, 65, 442