Skip to main content
4
Antti Haapala
  • 134.7k
  • 23
  • 297
  • 349
deleted 22 characters in body; edited title
Source Link
Jabberwocky
  • 51.3k
  • 18
  • 71
  • 127

What does + '0' meansmean in C

I have reading for athis line of code that:

binary[index] = (tempDecimal % 2) + '0'; 

Could you explain for the usefulusefulness of + '0' in this line of code for me  ?

What does + '0' means in C

I have reading for a line of code that

binary[index] = (tempDecimal % 2) + '0'; 

Could you explain for the useful of + '0' in this line of code for me  ?

What does + '0' mean in C

I have this line:

binary[index] = (tempDecimal % 2) + '0'; 

Could you explain the usefulness of + '0' in this line of code for me?

Post Closed as "Duplicate" by Blaze, rogerdpack, Jabberwocky c
added 6 characters in body
Source Link
Quentin
  • 63.5k
  • 7
  • 139
  • 199

I have reading for a line of code that

binary[index] = (tempDecimal % 2) + '0';

binary[index] = (tempDecimal % 2) + '0'; 

Could you explain for the useful of + '0'+ '0' in this line of code for me ?

I have reading for a line of code that

binary[index] = (tempDecimal % 2) + '0';

Could you explain for the useful of + '0' in this line of code for me ?

I have reading for a line of code that

binary[index] = (tempDecimal % 2) + '0'; 

Could you explain for the useful of + '0' in this line of code for me ?

Source Link

What does + '0' means in C

I have reading for a line of code that

binary[index] = (tempDecimal % 2) + '0';

Could you explain for the useful of + '0' in this line of code for me ?