This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Unicode

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a help. Thannks in advance.
Which of the following lines are valid declarations?
Select all valid answers.
a). char a='\u0061';
b) char \u0061='a';
c) char\u0061r a='a';
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rex Rodriguez:
I need a help. Thannks in advance.
Which of the following lines are valid declarations?
Select all valid answers.
a). char a='\u0061';
b) char \u0061='a';
c) char\u0061r a='a';


a and b are valid. but if c would have written like ch\u0061r a='a'; then even that would have been right. What happens here is at compile time unicode characters are translated first
 
Rex Rodriguez
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<<but if c would have written like ch\u0061r a='a'; then even that would have been right.>>
What is the conceptual basis for this? I am trying to learn and understand.
 
Arathi Rajashekar
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rex Rodriguez:
<<but if c would have written like ch\u0061r a='a'; then even that would have been right.>>
What is the conceptual basis for this? I am trying to learn and understand.


The concept here is while writing the program you can use unicode charcters also. Still you want some detail, frame the question and post. I will try to answer as much as possible
 
Rex Rodriguez
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that one can use unicode character. I was reading RHE book and he has an example something like this:
char='\u0000'
This is clear. I am not clear about the position of \u0000. Can we use \u0000 anywhere like char\u0000='a' so on and so forth. If yes, then what is the rule of the position.
Thanks for your help in advance.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!