Question{07}: Which statement is false about a \"for\" loop? A. the values maybe
ID: 3861192 • Letter: Q
Question
Question{07}: Which statement is false about a "for" loop?
A. the values maybe created from any valid vector
B. the vector increment may be positive or negative
C. a "for" loop must run at least once
D. a "break" can be used to exit a "for" loop early
E. none of the above
Answer{07}='';
Reason{07}='';
Question{08}: Which statment is true about a "while" loop?
A. an incorrectly written "while" loop will run "forever"
B. the value of a "while" expression should change to false to exit the
loop
C. a "break" can be used to exit a "while" loop early
D. it is best used when the number of loops is unknown (at design time)
E. all of the above
Answer{08}='';
Reason{08}='';
Question{09}: Which statement is true about a function
A. it may have zero, one or multiple input arguments
B. it may have zero, one or multiple output arguments (in Matlab)
C. in order for it to be ran from the command window, the filename
must match the function name
D. it has a signature based on the three parts: input arguments, function
name and output arguments
E. all of the above
Answer{09}='';
Reason{09}='';
Question{10}: Which statment is true about fileread?
A. can be used to read matlab .mat files
B. can be used to read text/string from a .txt file
C. parses contents of a file based on a space (default)
D. parses contents of a file based on a newline or other delimiter
E. none of the above
Answer{10}='';
Reason{10}='';
Explanation / Answer
Question{07}: Which statement is false about a "for" loop?
Answer{07}=C. a "for" loop must run at least once;
Reason{07}=if for condition returns false for the first time. Even for loop will not run atleast once;
Question{08}: Which statment is true about a "while" loop?
Answer{08}=E. all of the above;
Reason{08}=All statements are true;
Question{09}: Which statement is true about a function
Answer{09}=E. all of the above;
Reason{09}=All statements are true;
Question{10}: Which statment is true about fileread?
Answer{10}=D. parses contents of a file based on a newline or other delimiter;
Reason{10}=each line is separated by a newline or other delimiter;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.