Sunday 31 May 2015

Q35,paper 3,J 13 Which of the following is/are the fundamental semantic model(s) of parameter passing ?



(A) in mode
(B) out mode
(C) in-out mode
(D) all of the above
Answer D.

Explanation.

void write(int f)
{
//
}
void main()
{
int a = 3;
write (a);
}
We call a  as actual parameter and f as formal parameter.
Fundamental semantics model of parameter passing.
in -mode: Formal Parameters can receive data from Actual Parameter
• out-mode: Formal Parameter can transmit data to Actual Parameter
• inout-mode: Do both.
Conceptual Model of Data Transfer
• Transmission of actual value (copy)
• Transmission of access path (alias)




No comments:

Post a Comment

Note: only a member of this blog may post a comment.