MCQOPTIONS
Saved Bookmarks
| 1. |
class ternary_operator{ public static void main(String args[]) { int x = 3; int y = ~ x; int z; z = x > y ? x : y; System.out.print(z); }}28.What is the output of this program? |
| A. | 1 |
| B. | 2 |
| C. | Runtime error owing to division by zero in if condition |
| D. | Unpredictable behavior of program |
| Answer» C. Runtime error owing to division by zero in if condition | |