Professional Documents
Culture Documents
5 Input Output Operations - Updated
5 Input Output Operations - Updated
• int putchar(int)
• putchar(c) puts the character c on the standard output.
• it returns the character printed or EOF on error.
• int getchar()
• returns the next character from standard input.
Format Output
printf ("%d", 101) 101
printf ("%5d",101) SS101 [s is space]
printf ("%s",“INDIA") INDIA
printf ("%7s","hello") SSINDIA
Demonstrations
Output Operations using:
• putchar
• putc
• puts
• printf