Which of the following is a valid declaration of a char?
Check your spam folder if password reset mail not showing in inbox????
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
char ch = '\utea'; char ca = 'tea'; char cr = \u0223; char cc = '\itea'; Answer: (a) char ch = '\utea'; Explanation: A char literal may contain a Unicode character (UTF-16). We can directly use these characters only if our file system allows us, else use a Unicode escape (\u) such as "\u02teeRead more
Answer: (a) char ch = ‘\utea’;
Explanation: A char literal may contain a Unicode character (UTF-16). We can directly use these characters only if our file system allows us, else use a Unicode escape (\u) such as “\u02tee”. The char literals are always declared in single quotes (‘).
The option b, c, and d, are not valid because:
Hence, the correct answer is the option (a).
See less