If we wanted to write lines 3-6 tersely using the ternary operator, they would look like this:

```
1 float p( float x, int n )
2 {
3 if ( n == 0 )
4 return 1;
5 else
6 return x p( x, n – 1 );
7 }
```
A. return ( n != 0 )? 1 : x p( x, n – 1 );
B. return ( n == 0 )? x p( x, n – 1 ) : 1;
C. return ( n == 0 )? 1 : x p( x, n – 1 );
D. return ( n != 0 )? x p( x, n – 1 );


D

Computer Science & Information Technology

You might also like to view...

Clicking the FILE tab, as shown in the accompanying figure, will open ____.

A. the mail folder pane B. Backstage view C. the message pane D. the ribbon

Computer Science & Information Technology

What is a design concept?

What will be an ideal response?

Computer Science & Information Technology

Microsoft adopted _______________ as its authentication protocol for all Windows networks using a domain controller.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Suppose that alpha and beta are int variables. The statement alpha = beta--; is equivalent to the statement(s) ____.

A. alpha = 1 - beta; B. alpha = beta - 1; C. beta = beta - 1; alpha = beta; D. alpha = beta; beta = beta - 1;

Computer Science & Information Technology