1.

Variables need to have same name while being passed from the primary function to the sub-function.(a) True(b) FalseI have been asked this question in an internship interview.My question comes from Functions in division MATLAB Basics of MATLAB

Answer»

Right option is (b) False

Easiest explanation: It is dependent upon the programmer to choose the variable NAME while establishing a connection between a global and a PERSISTENT variable. Essentially, one MAY choose to keep the variable name same to AVOID CONFUSION in case of multiple sub-functions. But it is not necessary if there are a small number of sub-functions.



Discussion

No Comment Found

Related InterviewSolutions