We wish to write the following code segment using the ternary operator:

if ( a == b )
c = 5;
else
c = 0;

The resulting line of code would look like this:

A. c = ( a == b ) : 5 ? 0;
B. c = ( a == b )? 5 : 0;
C. c = ( a == b )? 0 : 5;
D. ( a == b )? c = 5 : 0;


B

Computer Science & Information Technology

You might also like to view...

Available on the options bar in the accompanying figure, the ____ gradient style creates shades in a counterclockwise sweep around the starting point.



a. Linear
b. Clock
c. Sweep
d. Angle

Computer Science & Information Technology

On a Mac computer, the sleepcopy is a file that is a copy of the contents of RAM. When a Mac goes into sleep (hibernation) mode, a copy of RAM is saved to the computer's hard drive

Indicate whether the statement is true or false.

Computer Science & Information Technology

An administrative scope is composed of multicast addresses intended to be used in a public network.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The string data type is one of the fundamental C++ data types.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology