Answer:
b. advanceToNextLine = ‘\\’;
Step-by-step explanation:
The syntax to use char data type is
char variable_name = 'character';
Note:
For char data type we always use single quotes and for string data type we use double quotes!
new-line character is represented by \\
Now lets arrange this information to create a variable named advanceToNextLine to store a new-line character in it.
char advanceToNextLine ='\\';
Hence the correct answer is option b
a. advanceToNextLine = ‘\‘ + ‘n’; syntax is wrong (invalid)
b. advanceToNextLine = ‘\\’; (valid)
c. advanceToNextLine = "\\"; double quotes are used (invalid)
d. advanceToNextLine = \\; single quotes are missing (invalid)