If we use for I 7 2 10 the statements will be executed 0 1
If we use for I - 7: 2: 10, the statements will be executed 0 1 2 3 4 times If we use for i = -5: 3: -7, the statements will be executed 0 1 2 3 4 times A = [1 2; 3 4]; B = [1 2; 2 4]; T = A- = B; it will generate T - [12; 3 4] [24, 5 8] [1 1; 0 1] [0 0; 1 0] none of above. for i=1: 7; if I == 5; continue; end; disp(\'A\'); and disp(\'B\'); How many times of \'A\" does it display? 5 4 3 2 1 for i=1: 2: 7; If I == 5; break; end; disp(\'A\') end; disp (\'B\'); How many time of A does it display? 5 4 3 2 1 for i=1: 2: 7; If I == 5; break and disp(\'A\'); end; disp (\'B\') How many times of \'A\' does it display? 5 4 3 2 1 x = 17; a = 2; while x > = 0; x = x -3\'s end; What is the output of x? -2 2 0 -1 8 Let a function file be function out=test(x, y) out= squareroot (x^2+y^2); when we call the function using res=test(3, 4) what is the value or res? Undefined function of variable 0 5 25 2.8284 Using the above function, when we call the function using res=test (3, 4, 5), what is the output? Undefined function or variable error, too many input arguments 3 4 5 Which in not one of the benefits of well-designed functions dependence of all other functions reusable code isolation from unintended side effects independent testing of sub-tasks none of above Let x = input (\'Enter x\') y = x^2; When we execute this program and input [1, 2] what is y? [1 4] [1 2] 5 2 error What is the answer after executing; max(max([1, 5, 3; 2, 4, 6])) 2 1 2 2 5 6 4 2 6 Which number is a perfect number 2 3 6 9 12 Let y = 2* (3> 10/5) + (1
Solution
13) The loop will be executed two times, so it works like start from 7 and then add 2 to it and go until 10.
14) The statements won\'t be executed that means 0 times, so it will start from -5 which is greater than -7 hence the condition fails.
24) Perfect number : By definition a perfect number is positive integer which is equal to sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself.
Hence 6 is the perfect number as the divisors of 6 are 1,2,3 excluding 6 and their sum (1+2+3) is 6.
29) The loop starts from -1 and goes till -50 hence Hello World will be displayed 50 times.
