2.5k views
5 votes
How is data passed to the functions printf() and putchar()? (Hint: they are passed differently)

User Tmesser
by
7.4k points

1 Answer

5 votes

Final answer:

Data is passed to the printf() and putchar() functions differently.

Step-by-step explanation:

When passing data to the printf() function in C, you can specify the data to be printed directly in the function call using format specifiers. For example, to print a string, you would use the '%s' format specifier and provide the string as an argument.

On the other hand, when passing data to the putchar() function, you pass a single character as an argument, and the function prints that character.

User Crokusek
by
7.7k points