Which of the following assignment statements is correct?

a. char c = 'd';
b. char c = 100;
c. char c = "d";
d. char c = "100";

a. char c = 'd';
b. char c = 100;
Choice (B) is also correct, because an int value can be implicitly cast into a char variable. The Unicode of the character is the int value. In this case, the character is d (see Appendix B).

Computer Science & Information Technology

You might also like to view...

The date serial number for December 25, 2007 is 12252007

Indicate whether the statement is true or false

Computer Science & Information Technology

Slices give you poorer control over the function and file size of your image, because slices cannot be optimized to load individually.

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

Computer Science & Information Technology