Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

char c = 32 //Why is it legal?

 
Vineet Sharma
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
char is "narrower" than int. Then how come the following does not give any error. (Note that no casting has been done.)
char c = 32;
Regards
Vineet
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Programmer Certification Study forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic