How to print “/” on C

  • A+
Category:Languages

I am trying to save in a char the symbol "/" and later print it but I can't.

Any good idea?

char direction = '/'; printf("%c", direction); 

 


Escape it.

char direction = '//'; 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: