Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 28 páginas
Examen

COMP 200 Final Exam 2025 Questions and Answers

Document preview thumbnail
Vista previa 3 fuera de 28 páginas

COMP 200 Final Exam 2025 Questions and Answers

Vista previa del contenido

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

Información del documento

Subido en
29 de abril de 2025
Número de páginas
28
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$12.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
OliviaWest
2.7
(23)
Vendido
119
Seguidores
17
Artículos
8422
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes