a) Choose the correct answer: 1. What will be the output for the following code? k=0; i=1; while(k<1 && i<2), k=k+1; i=i+1; i=i-k; end a) i=0, k=1 c) i=1, k=0 2. What is the output of the following code, A={'b', 10; 'A', 'c'}; b) i=0, k-0 d) i=1, k-1 a) A 2*2 cell array b) Error c) A 2*2 character array d) A 2*2 numeric array 3. Which of the following is the output of cat=strvcat('More','over')? b) A 2*2 character array d) Moreover a) More over c) A 2*4 character array 4. Create a 2-by-4 array of ones and compute the sum along its column. a) A = ones(4,2); S = sum(A,2) c) A = ones(2,4); S = sum(A,1) 5. What is the difference between the two code lines? C1 >> P=[50, eps]; C2 >> Q-[50, 'eps']; a) Code C1 initializes P as a character array while code C2 initializes Q as an integer array b) Code C2 initializes Q as a character array while code C1 initializes P as an integer array c) Both P and Q will be integer arrays d) Both P and Q will be character arrays b) A = ones(4,2); S = sum(A,1) d) A = ones(2,4); S = sum(A,2)
a) Choose the correct answer: 1. What will be the output for the following code? k=0; i=1; while(k<1 && i<2), k=k+1; i=i+1; i=i-k; end a) i=0, k=1 c) i=1, k=0 2. What is the output of the following code, A={'b', 10; 'A', 'c'}; b) i=0, k-0 d) i=1, k-1 a) A 2*2 cell array b) Error c) A 2*2 character array d) A 2*2 numeric array 3. Which of the following is the output of cat=strvcat('More','over')? b) A 2*2 character array d) Moreover a) More over c) A 2*4 character array 4. Create a 2-by-4 array of ones and compute the sum along its column. a) A = ones(4,2); S = sum(A,2) c) A = ones(2,4); S = sum(A,1) 5. What is the difference between the two code lines? C1 >> P=[50, eps]; C2 >> Q-[50, 'eps']; a) Code C1 initializes P as a character array while code C2 initializes Q as an integer array b) Code C2 initializes Q as a character array while code C1 initializes P as an integer array c) Both P and Q will be integer arrays d) Both P and Q will be character arrays b) A = ones(4,2); S = sum(A,1) d) A = ones(2,4); S = sum(A,2)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Q1)
a) Choose the correct answer:
1.
What will be the output for the following code?
k=0; i=1; while(k<1 && i<2), k=k+1; i=i+1; i=i-k; end
a) i=0, k=1
b) i=0, k-0
c) i=1, k-0
d) i=1, k=1
2. What is the output of the following code, A={'b', 10; 'A', 'c'};
a) A 2*2 cell array
b) Error
c) A 2*2 character array
d) A 2*2 numeric array
3. Which of the following is the output of cat=strvcat('More','over')?
b) A 2*2 character array
d) Moreover
a) More over
c) A 2*4 character array
4. Create a 2-by-4 array of ones and compute the sum along its column.
a) A = ones(4,2); S = sum(A,2)
c) A = ones(2,4); S = sum(A,1)
5. What is the difference between the two code lines?
C1 >> P [50, eps];
C2 >> Q [50, 'eps'];
a) Code C1 initializes P as a character array while code C2 initializes Q as an integer array
b) Code C2 initializes Q as a character array while code C1 initializes P as an integer array
c) Both P and Q will be integer arrays
d) Both P and Q will be character arrays
b) A = ones(4,2); S = sum(A,1)
d) A = ones(2,4); S = sum(A,2)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F13c7082b-0b73-488b-b5c7-43e0d0d6f1d3%2Fcdd9e13b-da59-4969-bce8-a41fa1b5acc5%2Fgwz3pdo_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Q1)
a) Choose the correct answer:
1.
What will be the output for the following code?
k=0; i=1; while(k<1 && i<2), k=k+1; i=i+1; i=i-k; end
a) i=0, k=1
b) i=0, k-0
c) i=1, k-0
d) i=1, k=1
2. What is the output of the following code, A={'b', 10; 'A', 'c'};
a) A 2*2 cell array
b) Error
c) A 2*2 character array
d) A 2*2 numeric array
3. Which of the following is the output of cat=strvcat('More','over')?
b) A 2*2 character array
d) Moreover
a) More over
c) A 2*4 character array
4. Create a 2-by-4 array of ones and compute the sum along its column.
a) A = ones(4,2); S = sum(A,2)
c) A = ones(2,4); S = sum(A,1)
5. What is the difference between the two code lines?
C1 >> P [50, eps];
C2 >> Q [50, 'eps'];
a) Code C1 initializes P as a character array while code C2 initializes Q as an integer array
b) Code C2 initializes Q as a character array while code C1 initializes P as an integer array
c) Both P and Q will be integer arrays
d) Both P and Q will be character arrays
b) A = ones(4,2); S = sum(A,1)
d) A = ones(2,4); S = sum(A,2)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY