Sunday, May 10, 2009

What do printf in c?

a printf statement is a command that simply prints the text you type in. nothing else. you probly want to use a scanf with the printf if you want to ask a question or sumthing like that.





heres and example of a printf.





printf("this is what you will see when you run the program");





its pretty simple.

What do printf in c?
It outputs data to a stream
Reply:printf creates a formatted output to the screen. there a variations, fprintf and sprintf that output to a file or a string. for an example:





int exampleInt = 3;


printf(("Hello exampleInt = %d\n",exampleInt );





outputs


"Hello exampleInt = 3"


the \n is a line feed.
Reply:it prints the text or any thing in c


No comments:

Post a Comment