Suppose x is a char variable with a value 'b'. What is the output of the statement System.out.println(++x)?

a. a
b. b
c. c
d. d

c The ++ and -- operators can be applied to a char variable. ++x is preincrement. x is 'b' before ++x. After ++x, x becomes c.

Computer Science & Information Technology

You might also like to view...

What is the purpose of the secure tab on a switch?

A) The switchport will automatically disable itself if a device with a different MAC address connects to the port. B) This enables the switch to select which networking devices have a selectable IP address. C) The switchport will use a different MAC address than the one connected to the port and will automatically enable itself. D) The switchport will use port discovery to assign a MAC address to the port.

Computer Science & Information Technology

To forward traffic from a host with the IP address of 10.0.0.100/25 to10.0.0.200/25 which of the following devices will be required?

A. A router B. A layer 2 switch C. A hub D. A DNS server

Computer Science & Information Technology