Difference between IN, OUT, IN OUT


           IN
                    OUT
                       IN OUT
It is the default.
It must be specified.
It must be specified.
It passes values to a subprogram.
It returns value to the caller.
It passes initial values to a subprogram and returns updated values to the caller.
It is a formal parameter acts like a constant.
It is a formal parameter acts like an uninitialized variable.
It is a formal parameter acts like an uninitialized variable
It is a formal parameter cannot be assigned  a value
It is a formal parameter cannot be used in an expression and must be assigned a value.
It is a formal parameter should be assigned a value.
It can be a constant, initialized variable, literal or expression
It must be a variable.
It must be a variable.

No comments:

Post a Comment