Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?

Nguyễn Pháp

New member
Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?
A. o(x,y);
B. o.m(x) && o.m(y);
C. m(x,y);
D. o.m(x,y);
 
Answer: d
Explanation: The two argument in a function are separated by a comma (,). The code above is an invocation expression: it includes a function expression o.m and two argument expressions, x and y.
 

Tìm kiếm

Back
Top