100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

CSCI1301 Exam 2 Questions And Correct Answers

Puntuación
-
Vendido
-
Páginas
6
Grado
A+
Subido en
11-10-2024
Escrito en
2024/2025

CSCI1301 Exam 2 Questions And Correct Answers...

Institución
CSCI1301
Grado
CSCI1301









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
CSCI1301
Grado
CSCI1301

Información del documento

Subido en
11 de octubre de 2024
Número de páginas
6
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

CSCI1301 Exam 2 Questions And Correct Answers


True or false: A while loop may execute the body of the loop *zero times* (perform zero
iterations) - ANSWER True



A while loop keeps repeating the body of the loop until. - ANSWER The controlling
Boolean expression becomes false



What happens if a loop never reaches a stopping point and becomes an infinite loop? -
ANSWER You have to abort the program manually



A for-loop has three parts: an initializing action, a Boolean expression, and an update
action. Which one of the following three occurs for the first time *after* the first iteration
of the loop? - ANSWER Update Action



True or false: There are some circumstances where it is impossible to use a while loop.
In such circumstances, you must use a for loop. - ANSWER False



True or False It is generally better to use a do-while loop than a while loop if you are
certain that the body of the loop should execute at least *once*. - ANSWER True



What is the key reason you would want to use a do-while loop instead of a while loop? -
ANSWER If you want the body of the loop to at least run once



What does the *continue* statement do? - ANSWER Skips the current iteration of a loop
body



True or False A single array can contain values of *different* data types. - ANSWER
False

, True or False An array must contain at least *2* elements. - ANSWER False



True or False You could have a program that has 2 arrays. One array stores int values
and the other stores String values. - ANSWER True



Which index is associated with the first element in an array? ANSWER 0



Is an array an object or a primitive data type? ANSWER Object



How would you find the size of the array? ANSWER Use arrayName.length



How does an object differ from a class? - ANSWER A class is a general definition for
objects. Objects are particular instances of the class which have values for the instance
variables.



What are the two main things that a class specifies for objects? - ANSWER Attributes
and actions(behaviours)



What type of method is the *main* method? - ANSWER Void



True or False Methods can have variables declared inside of them. - ANSWER True



True or False All methods must return a value or an object. - ANSWER False



If I had an object named fido and a method named bark, how would you call the method
bark on the fido object? - ANSWER fido.bark();



True or false: A variable that is declared *outside* of any method is called a *local*
variable. - ANSWER False
$9.99
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada


Documento también disponible en un lote

Conoce al vendedor

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.
Easton West Virgina University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
503
Miembro desde
2 año
Número de seguidores
221
Documentos
22060
Última venta
2 días hace

3.9

111 reseñas

5
53
4
21
3
21
2
7
1
9

Recientemente visto por ti

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