• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 34 páginas
Examen

CSIT Final UPDATED Actual Exam Questions and CORRECT Answers

Document preview thumbnail
Vista previa 4 fuera de 34 páginas

CSIT Final UPDATED Actual Exam Questions and CORRECT Answers Which of the following IS NOT a valid relational operator in Java? a. = b. c. == d. e. != - CORRECT ANSWER- A _____________ loop always executes its loop body at least once

Vista previa del contenido

CSIT Final UPDATED Actual Exam
Questions and CORRECT Answers
Which of the following IS NOT a valid relational operator in Java?


a. <=
b. >
c. ==
d. <>

e. != - CORRECT ANSWER✔✔- <>


A _____________ loop always executes its loop body at least once.


a. do
b. while
c. repeat
d. for

e. There are no loop structures with this property in Java. - CORRECT ANSWER✔✔- do


Suppose we want to condition an if statement on whether two String objects, referenced by
stringOne and stringTwo, are the same. Which of the following is the correct way to achieve
this?


a. if(stringOne == stringTwo)
b. if(stringOne.compareTo(stringTwo))
c. if(stringOne.equals(stringTwo))
d. if(stringOne != stringTwo)

e. if(stringOne = stringTwo) - CORRECT ANSWER✔✔- c. if(stringOne.equals(stringTwo))


Which of the following for loop headers will cause the body of the loop to be executed 10
times?

,a. for(int i = 0; i <= 10; i++)
b. for(int i = 0; i < 10; i++)
c. for(int i = 1; i <= 11; i++)
d. for(int i = 1; i < 10; i++)

e. None of these for loops will execute the loop body 10 times. - CORRECT ANSWER✔✔-
for(int i = 0; i < 10; i++)


Which boolean operation is described by the following table?


A - B - Operation
True - True - True
True - False - True
False - True - True
False - False - False


a. and
b. not
c. or

d. none of the above - CORRECT ANSWER✔✔- or


Which boolean operation is desrcibed by the following table?


A - B - Operation
True - True - True
True - False - False
False - True - False
False - False - False


a. and
b. not

,c. or

d. none of the above - CORRECT ANSWER✔✔- and


Which of the following boolean expressions tests to see if x is between 2 and 15 (including 2
and 15)?


a. (x <= 15 || x >= 2)
b. (2 <= x || x <= 15)
c. (x >= 2 && x <= 15)

d. (2 <= x <= 15) - CORRECT ANSWER✔✔- (x >= 2 && x <= 15)


What is the value of i after the following code fragment?


int i = 5;


switch(i)


{
case 0:i = 15;break;


case 1:i = 25;break;


case 2:i = 35;break;


case 3:i = 40;break;


default:i = 0;
}


a. 0
b. 15

, c. 35
d. 40

e. 25 - CORRECT ANSWER✔✔- 0


Given the following code, what is the final value of i?


int i;


for(i = 0; i <= 4;i ++ )


{
System.out.println(i);
}


a. 3
b. 4

c. 5 - CORRECT ANSWER✔✔- 5


Which of the following are valid case statements in a switch?


a. case 'ab':
b. case 1.5:
c. case 1:

d. case x < 4; - CORRECT ANSWER✔✔- case 1:


Given the following code fragment, and an input value of 5, what is the output?


int x;


if( x < 3)

Información del documento

Subido en
21 de septiembre de 2024
Número de páginas
34
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$10.49

¿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.
STANFORDGRADESS
4.0
(241)
Vendido
1672
Seguidores
109
Artículos
121810
Última venta
1 hora 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