Question: fast please! Given a function below, which of the following function call and result combinations is correct? function [x,y]=logic(a,b,c) if (ab)&&(c==b) y= true; else y=
Given a function below, which of the following function call and result combinations is correct? function [x,y]=logic(a,b,c) if (ab)&&(c==b) y= true; else y= false; end if a&&(bc) x= true; else x= false; end [X,Y]=logic(0,0,0); Answer: X=0;Y=1; [X,Y]=logic(0,0,1); Answer: X=1;Y=1; [X,Y]=logic(0,1,1); Answer: X=0;Y=1; [X,Y]=logic(1,0,1); Answer: X=1;Y=0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
