Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

15. If A=[1:38], then A(3) returns: C. a. 8 b. 3 16. (\'a\'-\'A\') returns: a. 3

ID: 3595179 • Letter: 1

Question


15. If A=[1:38], then A(3) returns: C. a. 8 b. 3 16. ('a'-'A') returns: a. 32 b. -32 c. Error d. None of the above. 17. If s=["Hello", 'world'], then length( s ) returns: 10 C. d. If a=12.453, then which of the following condition will not present it as 12.45: a. b. 2 None of the above. 18. fprintf("96.2f', a) None of the above. a. format bank b. disp(a) d. 19. When use fprintf, which of the following is not a proper format: %5d' %7.3F' None of the above d. b. e. %96.3f" 20. abc'-'b' returns: a. 1 0 1 b. 1 -10 d. None of the above

Explanation / Answer

15.
The array becomes [1 4 7]
Hence A(3) = 7
Option c

16
('a' - 'A') returns 32, that is the difference in the ASCII value of both characters
Option A

17
s = ['Hello';'world']
length(s) = 5, The length of the longest word
option c

18
disp(a) shows it as 12.453
Option b

19
%%.3f is invalid format
option c

20
'abc' - 'b' returns:
-1 0 1
Option a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote