What are the three valid declarations of a char? - ProProfs Discuss
Advertisement

What are the three valid declarations of a char?

What are the three valid declarations of a char?

Change Image    Delete

Asked by Ackerley, Last updated: Nov 11, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

John Smith

John Smith

John Smith
John Smith

Answered Sep 09, 2016

Char c1 = 064770;-2.

Char c3 = 0xbeef;-3.

Char c6 = \ \\uface\ ;

Char c1 = 064770; is an octal representation of the integer value 27128, which is legal because it fits into an unsigned 16-bit integer.

Char c3 = 0xbeef; is a hexadecimal representation of the integer value 48879, which fits into an unsigned 16-bit integer.

Char c6 = \\uface; is a unicode representation of a character.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.