Tag: programming languages
Questions Related to programming languages
-
With assertions enabled it prints 210210-1 followed by an AssertionError message.
-
With assertions enabled it prints 210210 followed by an AssertionError message.
-
With assertions enabled it prints only 210210
-
With assertions enabled it prints nothing.
-
With assertions disabled it prints 210210-1
-
With assertions disabled it prints only 210210
-
With assertions enabled it prints ABC followed by an AssertionError message.
-
With assertions disabled it prints ABC followed by an AssertionError message.
-
Assertions should not be used within the default case of a switch statement.
-
In this code example a throw statement must be used in place of the assert statement.
-
Compile-time error
-
If assertions are not enabled at run time it prints an error message.
-
If assertions are not enabled at run time it prints nothing.
-
With assertions enabled it prints an error message.
-
With assertions enabled it prints nothing.
-
The assert statement is being used to check a class invariant--something that must be true about each instance of the class
-
The assert statements are being used to check a precondition--something that must be true when the method is invoked.
-
The digit is 3
-
The digit is 2
-
The digit is 1
-
None of the above
-
text always precedes the
-
text always precedes the end of the end
-
text always precedes the end of the
-
None of the above
-
14
-
02
-
2009
-
Valentine's Day
-
would match any three-character string starting with "a" and ending with "z" whose second character was not a space, tab or newline.
-
the second character could be a letter, number or symbol
-
would match any three-character string starting with "a" and ending with "z" whose second character was a newline
-
None of the above
-
p is a function that accepts an argument which is a pointer to a character and returns a pointer to a 10 element integer array
-
p is a pointer to a function that accepts an argument which is a pointer to a character and returns an integer quantity
-
p is a function that accepts an argument which is a pointer to a character and returns an integer quantity
-
None of the above
-
p is a function that accepts an argument which is a pointer to a character and returns an integer quantity
-
p is a function that accepts an argument which is a pointer to a character and returns a pointer to an integer quantity
-
p is a function that returns a pointer to an integer quantity
-
None of the above
-
will match "cyclopentane"
-
will match "tri-pentane"
-
will match "n-pentane"
-
will match "neopentane"