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

CSCI1301 Exam 2 Questions 100% Solved.

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

CSCI1301 Exam 2 Questions 100% Solved. True or false: A while loop may execute the body of the loop *zero times* (perform zero iterations) - answerTrue A while loop keeps repeating the body of the loop until... - answerThe controlling Boolean expression becomes false What happens if a loop never reaches a stopping point and becomes an infinite loop? - answerYou 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 these three happens for the first time *after* the first iteration of the loop? - answerUpdate Action True or false: There are some situations where it is not possible to use a while loop. In these situations, you must use a for loop. - answerFalse True or false: It's typically better to use a do-while loop over a while loop if you know the loop body will execute at least *once*. - answerTrue ©SIRJOEL EXAM SOLUTIONS 10/11/2024 1:41 PM What is the main reason you would use a do-while loop over a while loop? - answerIf you want the loop body to execute at least once What does the *continue* statement do? - answerSkips the current iteration of a loop body True or false: A single array can contain values of *different* data types. - answerFalse True or false: An array must contain at least *2* elements. - answerFalse True or false: You could have a program that has 2 arrays. One array stores int values and the other stores String values. - answerTrue What index refers to the very first element of an array? - answer0 Is an array an object or a primitive type? - answerObject How do you find the number of elements in an array? - answerUse arrayNh How is an object different from a class? - answerA 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? - answerAttributes and actions (behaviors) What type of method is the *main* method? - answerVoid True or false: Methods may have variables declared inside of them. - answerTrue

Mostrar más Leer menos
Institución
CSCI
Grado
CSCI

Vista previa del contenido

©SIRJOEL EXAM SOLUTIONS
10/11/2024 1:41 PM



CSCI1301 Exam 2 Questions 100% Solved.


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 these three happens for the first time *after* the first iteration of the loop? -

answer✔Update Action


True or false: There are some situations where it is not possible to use a while loop. In these

situations, you must use a for loop. - answer✔False


True or false: It's typically better to use a do-while loop over a while loop if you know the loop

body will execute at least *once*. - answer✔True

, ©SIRJOEL EXAM SOLUTIONS
10/11/2024 1:41 PM


What is the main reason you would use a do-while loop over a while loop? - answer✔If you

want the loop body to execute at least 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


What index refers to the very first element of an array? - answer✔0


Is an array an object or a primitive type? - answer✔Object


How do you find the number of elements in an array? - answer✔Use arrayName.length


How is an object different 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

(behaviors)


What type of method is the *main* method? - answer✔Void


True or false: Methods may have variables declared inside of them. - answer✔True

Escuela, estudio y materia

Institución
CSCI
Grado
CSCI

Información del documento

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

Temas

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.
sirjoel Liberty University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
124
Miembro desde
1 año
Número de seguidores
13
Documentos
12605
Última venta
1 semana hace
Sirjoel

Here you will find all documents and package deals offered by sirjoel

3.5

17 reseñas

5
4
4
4
3
7
2
1
1
1

Documentos populares

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