What is the output of the following code? [code]syms p q; x=p+2*q; diff[x];[/code]

What is the output of the following code?
Code:
syms p q;
x=p+2*q;
diff[x];
A. 1
B. 0
C. Syntactical Error
D. Logical Error
 
Answer: c
Explanation: The output would’ve been 1 if the input to the diff command was given within parentheses. But the input has been given within [] which results in a syntactical Error.
 

Tìm kiếm

Back
Top