100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COMP 200 Final Exam 2025 Questions and Answers

Rating
-
Sold
1
Pages
28
Grade
A+
Uploaded on
29-04-2025
Written in
2024/2025

COMP 200 Final Exam 2025 Questions and Answers

Institution
COMP200
Course
COMP200










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
COMP200
Course
COMP200

Document information

Uploaded on
April 29, 2025
Number of pages
28
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

COMP 200 Final Exam 2025
Questions and Answers


Consider the following code fragment:

x = 2;

while x < 13

fprintf('We are the music makers, ')

fprintf('and we are the dreamers of dreams.\n')

x = x + 1.6;

end

How many lines of output will display in the Command Window?

a. 8 b. 16 c. 14 d. 7 - ✔✔D

What is an issue with trying to time computer code runs?

a. Run times can vary from run to run, especially if other tasks are competing for time
on the processor.

b. The operating system (OS) can make adjustments to the system clock, so using the
system clock for timing presents difficulties.

c. Both A and B are correct.



COPYRIGHT © 2025 BY OLIVIA WEST, ALL RIGHTS RESERVED 1

,d. None of the above - ✔✔C

n terms of amounts of required storage, how do these data types compare?

a. single < complex number consisting of singles < double

b. single < double < complex number consisting of singles

c. double < complex number consisting of singles = single

d. single < complex number consisting of singles = double - ✔✔D

In MATLAB, which relational operator can be used to check if two variables are not
equal to each other?

a. !=

b. <>

c. ==

d. ~= - ✔✔D

A sparse matrix is a matrix where:

a. The elements are zeros below the diagonal and non-zero above the diagonal.

b. Non-zero elements are confined to a diagonal band comprising the main diagonal,
and it can have zeros or more diagonals on either side of the main diagonal.

c. Most of the elements are zero.

d. Most of the elements are non-zero - ✔✔C

Consider the following code fragment:

x = [1 3 6]; j = 0;

for i = 1:5



COPYRIGHT © 2025 BY OLIVIA WEST, ALL RIGHTS RESERVED 2

, while j < 3

for k = x

% Nothing

end

if j/3 == 0

j = j + 2;

else

j = j + 1;

end

end

end

What will be the value of j at the end of this code fragment?

a. 4 b. 5 c. 3 d. 6 - ✔✔C

Consider the following code fragment:

a = 3;

b = 4;

switch a

case 1

if b > 2

c = 'Red Hot Chili Peppers';

else


COPYRIGHT © 2025 BY OLIVIA WEST, ALL RIGHTS RESERVED 3

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
OliviaWest Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
109
Member since
1 year
Number of followers
17
Documents
8528
Last sold
1 week ago
Pure Orchid Haven.

All Documents,and package deals offered by seller Olivia West.

2.8

22 reviews

5
6
4
2
3
4
2
1
1
9

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions