Write the difference between putchar() and
puts() functions.)
Answers
Answered by
50
Answer:
putchar is abbreviation for PUT CHARACTER whereas puts is abbreviation for PUT STRING. As the name specifies putchar is used for printing a single character on console or standard output whereas puts prints a string with an additional newline character at the end. It is used to write a line to the standard output.
IF MY ANSWER IS FIRST THEN MAKE MY ANS BRAINLIST I REACH GENIUS BATCH MATE PLEASE ❤️ STAY SAFE STAY HOME
Answered by
8
Putchar() is a single character function while puts() is a string function.
- Putchar() prints the character on a screen. Whereas, puts() writes a string on the screen. It also proceeds the cursor on a new line.
- For example - Putchar(x), thus it will display x on the screen.
- For example - Puts ( five) Puts ( six ). This code wlll print five and six in separate lines. This is because the cursor will first print five and then move to other line to print six.
Similar questions