What are the two ways of formating of output in c?

1 answer

Answer

1040125

2026-04-29 15:15

+ Follow

In C, the two primary ways of formatting output are using printf() and fprintf(). The printf() function is used for standard output to the console, while fprintf() allows for formatted output to a specified file stream. Both functions utilize format specifiers to control the display of variables, such as %d for integers and %f for floating-point numbers. Additionally, sprintf() can be used to format output into a string instead of sending it directly to a console or file.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.