DATA STRUCTURE Programming and Technical Logical Reasoning Coding Decoding

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

Read Solution (Total 8)

DATA STRUCTURE Other Question

Vrinda writes an efficient program to sum two square diagonal matrices
(matrices with elements only on diagonal). The size of each matrix is nXn. What is the
time complexity of Vrinda's algorithm?
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)