1.

The teacher has given the assignment to find the sum of 2 numbers. But the code should not contain the ‘+’ operator. What is to be done?(a) Use a function(b) Add the values and print the sum directly(c) Use an expression(d) Cannot be doneI got this question by my school principal while I was bunking the class.I'm obligated to ask this question of Functions and Expressions topic in division Beyond the Basics of MATLAB

Answer» RIGHT CHOICE is (a) Use a function

The best I can explain: The power of a function is to hide the statements which are used to complete our TASK. So the student can create a function file to add two numbers. HENCE, the code will not show the ‘+’ operator but it will be used implicitly.


Discussion

No Comment Found

Related InterviewSolutions