Given the following code:

enum car (toyota, ford, buick, nissan);
car mine = toyota;
what is the value of
int (mine + 2)?

a) 2
b) 3
c) buick
d) the code is not syntactically correct


d) the code is not syntactically correct

Computer Science & Information Technology

You might also like to view...

Which of the following is the prototype for a member function have_birthday of a person class. The function increments a data member called age by 1.

a) int have_birthday (int ); b) void have_birthday ( ) const; c) void have_birthday (int ) const; d) void have_birthday ( );

Computer Science & Information Technology

Memorize the mnemonic for setting the copy shown right. Then mark up the copy using the symbols to the right, showing where you will press the tab key and the location and style of each tab stop.

What will be an ideal response?

Computer Science & Information Technology

Which of the following are C-string constants? Give the number of characters in each of these.

a. ‘\n’ b. ‘n’ c. “Lamb\n” d. “Mary” e. “M”

Computer Science & Information Technology

If the variable named ANSWER has a value of 1, what will be output after the instructions corresponding to the following pseudocode are executed?

``` IF ANSWER = 1 THEN Write “Hello” ELSE IF ANSWER = 2 THEN Write “Goodbye” ELSE Write “Good day” ENDIF ENDIF ``` a) Hello b) Goodbye c) Good day d) both a and c

Computer Science & Information Technology