programming languages Online Quiz - 96
Description: programming languages Online Quiz - 96 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
"What will be the output of the following snippet: MOVE ZERO TO WS-COUNT IF WS-COUNT = 0 CONTINUE END-IF ADD +1 TO WS-COUNT. DISPLAY 'VALUE OF WS-COUNT: ' WS-COUNT "
"What will be the output of the following snippet: MOVE ZERO TO WS-COUNT IF WS-COUNT = 0 NEXT SENTENCE END-IF ADD +1 TO WS-COUNT. DISPLAY 'VALUE OF WS-COUNT: ' WS-COUNT "
The "switch" selection structure must end with the default case.
What results from attempting to compile and run the following code? public class Ternary { public static void main(String args[]) { int a = 5; System.out.println("Value is - " + ((a < 5) ? 9.9 : 9)); } }
What is the result when you compile and run the following code? public class Test { public void method() { for(int i = 0; i < 3; i++) { System.out.print(i); } System.out.print(i); } }
The modulus operator (%) in Java can be used only with variables of integer type.