using putchar or putc
I am trying to write an int to the screen using putchar or putc. The number is defined as an int. putchar, or putc does not write anything to the screen. I have to defined it as in int and put quotes around it. eg. int number = '0'. Only then do I get output. I have even tried converting the number to a charater by doing (char)number and that did not work. Does anyone know the correct way to get putchar or putc to print a integer? Thanks
|