PDF Download
FREE AND STUDY GAMES ABOUT CCS0070 M3 - M4 EXAM
QUESTIONS
Actual Qs and Ans Expert-Verified Explanation
This Exam contains:
-Guarantee passing score -68 Questions and Answers -format set of multiple-choice -Expert-Verified Explanation
Question 1: What is the output of the following code fragment?
for ( int j = 10; j > 5; j-- ) System.out.print( j + " " ); System.out.println( );
Answer:
10 9 8 7 6
Question 2: The statements associated with this keyword is executed if the value of the switch variable does not match any of the case constants.
Answer:
default
Question 3: An operator that can be used to add String objects.
+ - *
Answer:
+
Question 4: It adds right operand to the left operand and assign the result to left operand.+= -= *=
Answer:
+=
Question 5: What does the code output?
int x=3; int i=0; while(i<3){ System.out.println("hi"); i++; }
Answer:
hi hi hi Question 6: [ T / F ] Decrement operators increase the value of the variable by a particular number by which it is increased
Answer:
False Question 7: [ T / F ] bitwise operator is an operator that takes only one value for its operation
Answer:
False Question 8: is an operator used to perform bitwise operations on bit patterns or binary numerals that involve the manipulation of individual bits Arithmetic Operator Relational Operator Bitwise Operator Logical Operator
Answer:
bitwise operator
Question 9: What will be the output of the following program?
int i = 34.0; int j = 7; int k = i % j; System.out.println("k = " + k );
Answer:
the program will encounter a error Question 10: [ T / F ] The lbl identifies any valid statement to which control must be transferred
Answer:
False
Question 11: [ T / F ] 10>15 || 2<3||100<23
Answer:
True Question 12: Consider the following codes: int x=3; System.out.println(--x); What will be the EXACT output?
Answer:
2
Question 13: What is the result of 7%2
Answer:
1
Question 14: What will be the output of the following program
System.out.println(10 * 5 + 100 * (25 * 11) / (25 * 10) * 10 - 5 + 7% 2); int zx = (10 * 5 + 100 * (25 * 11)); int yz = ((25 * 10) * 10 - 5 + 7 % 2); System.out.println(zx / yz);
Answer:
1146 11
Question 15: It multiplies right operand with the left operand and assign the result to left operand.+= -= *=
Answer:
*= Question 16: It adds right operand to the left operand and assign the result to left operand.
Answer:
+= Question 17: Supposed: double x = 13.1614; int y = (int)x; what is the value of y?
Answer:
13
Question 18: What is the output of the following code fragment
int count = 0; for ( ; count < 9; ++count ) System.out.print( count + " " ); System.out.println( );
Answer:
0 1 2 3 4 5 6 7 8
Question 19: What will be the output of the following program?
bool lampX = false, result; bool lampY = true; result = lampY && lampX; System.out.println("Lamp switch-on " + result); result = lampY & lampX; System.out.println("Lamp switch-on " + result);
Answer:
Lamp switch-on false Lamp switch-on false